This commit is contained in:
seb
2026-11-01 04:58:46 +01:00
parent 43d7049a7b
commit 8a5a307c50

View File

@@ -507,11 +507,11 @@ export function register(app, basePath = '') {
* application/json:
* schema:
* type: object
* required: [agentprinterId]
* properties:
* printerId:
* type: integer
* agentprinterId:
* type: integer
* description: Agent printer ID
* templateId:
* type: integer
* objects:
@@ -552,8 +552,7 @@ export function register(app, basePath = '') {
}
const companyId = selected.companyId;
const rawPrinterId = req.body?.printerId ?? req.body?.agentprinterId;
const parsedPrinterId = parsePositiveInt(rawPrinterId, 'printerId');
const parsedPrinterId = parsePositiveInt(req.body?.agentprinterId, 'agentprinterId');
if (parsedPrinterId.error) {
return res.status(400).json({ error: parsedPrinterId.error });
}