feat: implement region-based QR code scanning for inbox documents
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s

This commit is contained in:
2026-05-04 21:39:32 +02:00
parent 60ac522435
commit 9a1095ad6e
7 changed files with 226 additions and 3 deletions
@@ -143,6 +143,17 @@ export class InboxController {
return new StreamableFile(createReadStream(filePath));
}
@Post(':id/pages/:page/scan-region')
async scanRegion(
@Param('id') id: string,
@Param('page', ParseIntPipe) page: number,
@Body() body: { x: number; y: number; w: number; h: number },
@Request() req: any,
): Promise<{ found: string[] }> {
const preferredUsername: string | null = req.user?.preferredUsername ?? null;
return this.inboxService.scanRegion(id, page, body.x, body.y, body.w, body.h, preferredUsername);
}
@Post(':id/source')
@HttpCode(204)
async updateSource(