mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-16 22:35:02 +01:00
wip: zen
This commit is contained in:
@@ -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`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user