wip: zen
This commit is contained in:
parent
1b17d8070b
commit
9e8fd16e6e
13 changed files with 437 additions and 62 deletions
|
|
@ -20,6 +20,7 @@ export namespace Actor {
|
|||
properties: {
|
||||
userID: string
|
||||
workspaceID: string
|
||||
accountID: string
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -71,4 +72,12 @@ export namespace Actor {
|
|||
}
|
||||
throw new Error(`actor of type "${actor.type}" is not associated with a workspace`)
|
||||
}
|
||||
|
||||
export function account() {
|
||||
const actor = use()
|
||||
if ("accountID" in actor.properties) {
|
||||
return actor.properties.accountID
|
||||
}
|
||||
throw new Error(`actor of type "${actor.type}" is not associated with an account`)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue