mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-21 20:36:37 +00:00
rename auth and start work separating config
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user