diff --git a/src/api/routes/labeltemplate.js b/src/api/routes/labeltemplate.js index 2fff20c..bcb31f3 100644 --- a/src/api/routes/labeltemplate.js +++ b/src/api/routes/labeltemplate.js @@ -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 }); }