mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 06:29:23 +02:00
basic invite user functional
This commit is contained in:
parent
d739bce3dc
commit
b47e11800d
15 changed files with 684 additions and 137 deletions
|
@ -24,6 +24,8 @@ const inviteUserBodySchema = z.object({
|
|||
validHours: z.number().gt(0).lte(168),
|
||||
});
|
||||
|
||||
export type InviteUserBody = z.infer<typeof inviteUserBodySchema>;
|
||||
|
||||
export type InviteUserResponse = {
|
||||
inviteLink: string;
|
||||
expiresAt: number;
|
||||
|
@ -112,7 +114,7 @@ export async function inviteUser(
|
|||
roleId,
|
||||
});
|
||||
|
||||
const inviteLink = `${config.app.base_url}/invite/${inviteId}-${token}`;
|
||||
const inviteLink = `${config.app.base_url}/invite?token=${inviteId}-${token}`;
|
||||
|
||||
return response<InviteUserResponse>(res, {
|
||||
data: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue