WIP - permissions
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import Knex from 'knex';
|
||||
import type { Knex as KnexType } from 'knex';
|
||||
import { Model } from 'objection';
|
||||
import { CentralTenant, CentralDomain, CentralUser } from '../models/central.model';
|
||||
|
||||
let centralKnex: Knex.Knex | null = null;
|
||||
let centralKnex: KnexType | null = null;
|
||||
|
||||
/**
|
||||
* Get or create a Knex instance for the central database
|
||||
* This is used for Objection models that work with central entities
|
||||
*/
|
||||
export function getCentralKnex(): Knex.Knex {
|
||||
export function getCentralKnex(): KnexType {
|
||||
if (!centralKnex) {
|
||||
const centralDbUrl = process.env.CENTRAL_DATABASE_URL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user