Freigabe #4

Merged
bjoernpoettker merged 23 commits from Freigabe into main 2026-06-16 14:49:23 +00:00
Showing only changes of commit 4016802c1e - Show all commits
@@ -60,19 +60,19 @@ export class LabelPrintAgentController {
// Agent: nächsten Job abholen (Polling) // Agent: nächsten Job abholen (Polling)
@Get('jobs/next') @Get('jobs/next')
async getNextJob(@Query('agentId') agentId: string, @Res({ passthrough: true }) res: Response) { async getNextJob(@Query('agentId') agentId: string, @Res() res: Response) {
const job = await this.service.claimNextJob(agentId ?? 'unknown'); const job = await this.service.claimNextJob(agentId ?? 'unknown');
if (!job) { if (!job) {
res.status(HttpStatus.NO_CONTENT).send(); res.status(HttpStatus.NO_CONTENT).send();
return; return;
} }
return { res.status(HttpStatus.OK).json({
jobId: String(job.Id), jobId: String(job.Id),
labelImageBase64: job.LabelImageData ? job.LabelImageData.toString('base64') : null, labelImageBase64: job.LabelImageData ? job.LabelImageData.toString('base64') : null,
labelImageContentType: 'image/png', labelImageContentType: 'image/png',
labelWidthMm: job.LabelWidthMm, labelWidthMm: job.LabelWidthMm,
labelHeightMm: job.LabelHeightMm, labelHeightMm: job.LabelHeightMm,
}; });
} }
// Agent: Bild separat abrufen // Agent: Bild separat abrufen