mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-10 20:02:26 +00:00
make config class and separate migrations script
This commit is contained in:
@@ -3,11 +3,10 @@ import { orgs } from "../db/schema";
|
||||
import config from "@server/config";
|
||||
import { ne } from "drizzle-orm";
|
||||
import logger from "@server/logger";
|
||||
import { extractBaseDomain } from "@server/utils/extractBaseDomain";
|
||||
|
||||
export async function copyInConfig() {
|
||||
// create a url from config.app.base_url and get the hostname
|
||||
const domain = extractBaseDomain(config.app.base_url);
|
||||
// create a url from config.getRawConfig().app.base_url and get the hostname
|
||||
const domain = config.getBaseDomain();
|
||||
|
||||
// update the domain on all of the orgs where the domain is not equal to the new domain
|
||||
// TODO: eventually each org could have a unique domain that we do not want to overwrite, so this will be unnecessary
|
||||
|
||||
Reference in New Issue
Block a user