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