u
This commit is contained in:
@@ -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 });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user