split base_url into dashboard_url and base_domain

This commit is contained in:
Milo Schwartz 2025-01-07 20:32:24 -05:00
parent 26a165ab71
commit e1f0834af4
No known key found for this signature in database
17 changed files with 100 additions and 37 deletions

View file

@ -82,7 +82,7 @@ export async function requestPasswordReset(
});
});
const url = `${config.getRawConfig().app.base_url}/auth/reset-password?email=${email}&token=${token}`;
const url = `${config.getRawConfig().app.dashboard_url}/auth/reset-password?email=${email}&token=${token}`;
await sendEmail(
ResetPasswordCode({

View file

@ -101,7 +101,7 @@ export async function verifyResourceSession(
return allowed(res);
}
const redirectUrl = `${config.getRawConfig().app.base_url}/auth/resource/${encodeURIComponent(resource.resourceId)}?redirect=${encodeURIComponent(originalRequestURL)}`;
const redirectUrl = `${config.getRawConfig().app.dashboard_url}/auth/resource/${encodeURIComponent(resource.resourceId)}?redirect=${encodeURIComponent(originalRequestURL)}`;
if (!sessions) {
return notAllowed(res);

View file

@ -82,7 +82,6 @@ export async function createOrg(
let org: Org | null = null;
await db.transaction(async (trx) => {
// create a url from config.getRawConfig().app.base_url and get the hostname
const domain = config.getBaseDomain();
const newOrg = await trx

View file

@ -152,7 +152,7 @@ export async function inviteUser(
});
});
const inviteLink = `${config.getRawConfig().app.base_url}/invite?token=${inviteId}-${token}`;
const inviteLink = `${config.getRawConfig().app.dashboard_url}/invite?token=${inviteId}-${token}`;
if (doEmail) {
await sendEmail(