mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-04 01:55:10 +02:00
rename auth and start work separating config
This commit is contained in:
parent
d447de9e8a
commit
b199595100
15 changed files with 153 additions and 120 deletions
|
@ -11,6 +11,7 @@ import { createAdminRole } from "@server/setup/ensureActions";
|
|||
import config from "@server/config";
|
||||
import { fromError } from "zod-validation-error";
|
||||
import { defaultRoleAllowedActions } from "../role";
|
||||
import { extractBaseDomain } from "@server/utils/extractBaseDomain";
|
||||
|
||||
const createOrgSchema = z
|
||||
.object({
|
||||
|
@ -83,7 +84,7 @@ export async function createOrg(
|
|||
|
||||
await db.transaction(async (trx) => {
|
||||
// create a url from config.app.base_url and get the hostname
|
||||
const domain = new URL(config.app.base_url).hostname;
|
||||
const domain = extractBaseDomain(config.app.base_url);
|
||||
|
||||
const newOrg = await trx
|
||||
.insert(orgs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue