mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
25 lines
753 B
TypeScript
25 lines
753 B
TypeScript
import { Db, IUnleashConfig } from 'lib/server-impl';
|
|
import PrivateProjectStore from './privateProjectStore';
|
|
import { PrivateProjectChecker } from './privateProjectChecker';
|
|
import { FakePrivateProjectChecker } from './fakePrivateProjectChecker';
|
|
|
|
export const createPrivateProjectChecker = (
|
|
db: Db,
|
|
config: IUnleashConfig,
|
|
): PrivateProjectChecker => {
|
|
const { getLogger } = config;
|
|
const privateProjectStore = new PrivateProjectStore(db, getLogger);
|
|
|
|
return new PrivateProjectChecker(
|
|
{
|
|
privateProjectStore: privateProjectStore,
|
|
},
|
|
config,
|
|
);
|
|
};
|
|
|
|
export const createFakePrivateProjectChecker =
|
|
(): FakePrivateProjectChecker => {
|
|
return new FakePrivateProjectChecker();
|
|
};
|