mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 01:01:20 +10:00
User invite uses external domain option (#118)
* feat: user invite uses external domain option fixes #117 * fix: inconsistent external url format * fix: normalize external url more cleanly
This commit is contained in:
@ -2,6 +2,7 @@ import { readDropValidatedBody, throwingArktype } from "~/server/arktype";
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import prisma from "~/server/internal/db/database";
|
||||
import { SharedRegisterValidator } from "../../../auth/signup/simple.post";
|
||||
import { systemConfig } from "~/server/internal/config/sys-conf";
|
||||
|
||||
const CreateInvite = SharedRegisterValidator.partial()
|
||||
.and({
|
||||
@ -22,5 +23,8 @@ export default defineEventHandler(async (h3) => {
|
||||
data: body,
|
||||
});
|
||||
|
||||
return invitation;
|
||||
return {
|
||||
...invitation,
|
||||
inviteUrl: `${systemConfig.getExternalUrl()}/auth/register?id=${invitation.id}`,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user