fix: use manual res.json() in getNextJob to prevent double-response on 204
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 10:43:03 +02:00
parent d5bc1bcee0
commit 4016802c1e
@@ -60,19 +60,19 @@ export class LabelPrintAgentController {
// Agent: nächsten Job abholen (Polling)
@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');
if (!job) {
res.status(HttpStatus.NO_CONTENT).send();
return;
}
return {
res.status(HttpStatus.OK).json({
jobId: String(job.Id),
labelImageBase64: job.LabelImageData ? job.LabelImageData.toString('base64') : null,
labelImageContentType: 'image/png',
labelWidthMm: job.LabelWidthMm,
labelHeightMm: job.LabelHeightMm,
};
});
}
// Agent: Bild separat abrufen