refactor(realtime, systemNotices, addons, airports, audit, categories, permissions, query-helpers, tags, transit, trip-membership): async DB-touching methods; transactions through UnitOfWork

This commit is contained in:
jubnl
2026-09-21 20:48:03 +02:00
parent 27d044f9e8
commit 0cf99a9939
306 changed files with 3656 additions and 3189 deletions
@@ -97,8 +97,8 @@ export class DawarichController {
@Delete('settings')
@HttpCode(200)
disconnect(@CurrentUser() user: User, @Req() req: Request) {
this.dawarich.disconnect(user.id, getClientIp(req));
async disconnect(@CurrentUser() user: User, @Req() req: Request) {
await this.dawarich.disconnect(user.id, getClientIp(req));
this.tracks.forget(user.id);
return { success: true };
}
@@ -138,7 +138,10 @@ export class DawarichController {
@Body() body: DawarichAcceptDto,
@Req() req: Request,
) {
return this.guard(() =>
// guardAsync, not guard: accept() is async now, so its AcceptError arrives as
// a rejection a synchronous try/catch cannot see — and the domain's own code
// would be dropped from the body.
return this.guardAsync(() =>
this.suggestions.accept(user.id, parseId(id), body, socketId(req)),
);
}