mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-04 10:05:53 +02:00
basic invite user functional
This commit is contained in:
parent
a6bb8f5bb1
commit
a6baebb216
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