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