mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
22 lines
714 B
TypeScript
22 lines
714 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,
|
|
});
|
|
};
|
|
|
|
export const createFakePrivateProjectChecker =
|
|
(): FakePrivateProjectChecker => {
|
|
return new FakePrivateProjectChecker();
|
|
};
|