mirror of
https://github.com/docmost/docmost.git
synced 2026-08-29 18:14:58 +08:00
feat(ee): personal spaces
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { ModuleRef } from '@nestjs/core';
|
||||
|
||||
export async function provisionPersonalSpaceForNewUser(
|
||||
moduleRef: ModuleRef,
|
||||
userId: string,
|
||||
workspaceId: string,
|
||||
): Promise<void> {
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const personalSpaceModule = require('../../ee/personal-space/services/personal-space.service');
|
||||
const personalSpaceService = moduleRef.get(
|
||||
personalSpaceModule.PersonalSpaceService,
|
||||
{ strict: false },
|
||||
);
|
||||
await personalSpaceService.provisionForNewUser(userId, workspaceId);
|
||||
} catch {
|
||||
// module not found
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user