mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 17:26:24 +00:00
refactor(llm-parse, mcp-shared, oauth, place-shadow, route-usage, storage, todo, trip-invite): async DB-touching methods; transactions through UnitOfWork
This commit is contained in:
@@ -316,11 +316,11 @@ export class AdminController {
|
||||
}
|
||||
|
||||
@Get('oauth-sessions')
|
||||
listOAuthSessions() { return { sessions: this.oauth.listAllOAuthSessions() }; }
|
||||
async listOAuthSessions() { return { sessions: await this.oauth.listAllOAuthSessions() }; }
|
||||
|
||||
@Delete('oauth-sessions/:id')
|
||||
async revokeOAuthSession(@CurrentUser() user: User, @Param('id') id: string, @Req() req: Request) {
|
||||
ok(this.oauth.adminRevokeOAuthSession(id));
|
||||
ok(await this.oauth.adminRevokeOAuthSession(id));
|
||||
await this.audit.writeAudit({ userId: user.id, action: 'admin.oauth_session_revoke', resource: String(id), ip: getClientIp(req) });
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user