mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-04 15:30:27 +00:00
wip: zen
This commit is contained in:
parent
ee846235f2
commit
4227b89ebc
3 changed files with 217 additions and 65 deletions
|
|
@ -58,8 +58,9 @@ export namespace User {
|
|||
z.object({
|
||||
email: z.string(),
|
||||
role: z.enum(UserRole),
|
||||
monthlyLimit: z.number().nullable().optional(),
|
||||
}),
|
||||
async ({ email, role }) => {
|
||||
async ({ email, role, monthlyLimit }) => {
|
||||
Actor.assertAdmin()
|
||||
const workspaceID = Actor.workspace()
|
||||
|
||||
|
|
@ -80,10 +81,12 @@ export namespace User {
|
|||
}),
|
||||
workspaceID,
|
||||
role,
|
||||
monthlyLimit,
|
||||
})
|
||||
.onDuplicateKeyUpdate({
|
||||
set: {
|
||||
role,
|
||||
monthlyLimit,
|
||||
timeDeleted: null,
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue