service url context

This commit is contained in:
Max Peintner
2025-01-28 16:56:31 +01:00
parent ad0397af7c
commit e8900501b9
8 changed files with 183 additions and 197 deletions

View File

@@ -23,14 +23,14 @@ export type RegisterUserResponse = {
export async function inviteUser(command: InviteUserCommand) {
const _headers = await headers();
const instanceUrl = getApiUrlOfHeaders(_headers);
const host = instanceUrl;
const host = _headers.get("host");
if (!host) {
return { error: "Could not get domain" };
}
const human = await addHumanUser({
host,
host: instanceUrl,
email: command.email,
firstName: command.firstName,
lastName: command.lastName,