mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +08:00
feat(server): synthetic root doc (#14794)
This commit is contained in:
@@ -59,6 +59,22 @@ export class CopilotContextModel extends BaseModel {
|
||||
return row;
|
||||
}
|
||||
|
||||
async getAccessInfo(id: string) {
|
||||
return await this.db.aiContext.findFirst({
|
||||
where: { id },
|
||||
select: {
|
||||
id: true,
|
||||
sessionId: true,
|
||||
session: {
|
||||
select: {
|
||||
userId: true,
|
||||
workspaceId: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async getConfig(id: string) {
|
||||
const row = await this.get(id);
|
||||
if (row) {
|
||||
|
||||
Reference in New Issue
Block a user