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:
jubnl
2026-09-21 23:27:01 +02:00
parent bb390a5407
commit e413308227
61 changed files with 977 additions and 925 deletions
@@ -25,19 +25,19 @@ export class RouteUsageController {
*/
@Post('report')
@HttpCode(200)
report(@Body() body: RouteUsageReportDto): RouteUsageReportResult {
return { recorded: this.usage.record(body) };
async report(@Body() body: RouteUsageReportDto): Promise<RouteUsageReportResult> {
return { recorded: await this.usage.record(body) };
}
@Get('summary')
@UseGuards(JwtAuthGuard, AdminGuard)
summary(): RouteUsageSummaryResult {
return this.usage.summary();
async summary(): Promise<RouteUsageSummaryResult> {
return await this.usage.summary();
}
@Delete()
@UseGuards(JwtAuthGuard, AdminGuard)
clear(): { removed: number } {
return { removed: this.usage.clear() };
async clear(): Promise<{ removed: number }> {
return { removed: await this.usage.clear() };
}
}