mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
feat(server): add doc embedding switch for workspace (#11760)
fix AI-33
This commit is contained in:
@@ -16,7 +16,12 @@ declare global {
|
||||
export type { Workspace };
|
||||
export type UpdateWorkspaceInput = Pick<
|
||||
Partial<Workspace>,
|
||||
'public' | 'enableAi' | 'enableUrlPreview' | 'name' | 'avatarKey'
|
||||
| 'public'
|
||||
| 'enableAi'
|
||||
| 'enableUrlPreview'
|
||||
| 'enableDocEmbedding'
|
||||
| 'name'
|
||||
| 'avatarKey'
|
||||
>;
|
||||
|
||||
@Injectable()
|
||||
@@ -88,5 +93,10 @@ export class WorkspaceModel extends BaseModel {
|
||||
const workspace = await this.get(workspaceId);
|
||||
return workspace?.enableUrlPreview ?? false;
|
||||
}
|
||||
|
||||
async allowEmbedding(workspaceId: string) {
|
||||
const workspace = await this.get(workspaceId);
|
||||
return workspace?.enableDocEmbedding ?? false;
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user