mirror of
https://github.com/docmost/docmost.git
synced 2026-08-24 21:52:13 +10:00
refactor design
This commit is contained in:
@@ -50,6 +50,21 @@ export class IntegrationConnectionService {
|
||||
);
|
||||
}
|
||||
|
||||
async getUserConnections(userId: string, workspaceId: string) {
|
||||
const rows = await this.connectionRepo.findByUserAndWorkspace(
|
||||
userId,
|
||||
workspaceId,
|
||||
);
|
||||
|
||||
return rows.map((row) => ({
|
||||
integrationId: row.integrationId,
|
||||
type: row.type,
|
||||
isEnabled: row.isEnabled,
|
||||
providerUserId: row.providerUserId ?? null,
|
||||
connectedAt: row.createdAt,
|
||||
}));
|
||||
}
|
||||
|
||||
async disconnect(
|
||||
integrationId: string,
|
||||
userId: string,
|
||||
|
||||
Reference in New Issue
Block a user