add direct invitation link
All checks were successful
deploy / build-and-deploy (push) Successful in 21s
All checks were successful
deploy / build-and-deploy (push) Successful in 21s
This commit is contained in:
@@ -144,5 +144,31 @@ export const user = {
|
||||
blocked: await db.getBlockedUsers({})
|
||||
};
|
||||
}
|
||||
}),
|
||||
addDirectInvitation: defineAction({
|
||||
handler: async (_, context) => {
|
||||
Session.actionSessionFromCookies(context.cookies, Permissions.Users);
|
||||
|
||||
return await db.addDirectSignup({});
|
||||
}
|
||||
}),
|
||||
deleteDirectInvitation: defineAction({
|
||||
input: z.object({
|
||||
hash: z.string()
|
||||
}),
|
||||
handler: async (input, context) => {
|
||||
Session.actionSessionFromCookies(context.cookies, Permissions.Users);
|
||||
|
||||
await db.deleteDirectSignup({ hash: input.hash });
|
||||
}
|
||||
}),
|
||||
directInvitations: defineAction({
|
||||
handler: async (_, context) => {
|
||||
Session.actionSessionFromCookies(context.cookies, Permissions.Users);
|
||||
|
||||
return {
|
||||
directInvitations: await db.getDirectSignups({})
|
||||
};
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user