u
This commit is contained in:
@@ -41,16 +41,19 @@ export const agentprinter = {
|
||||
|
||||
/**
|
||||
* PUT /api/agentprinter/order
|
||||
* Body: { printeragentId: number, agentprinterIds: number[] }
|
||||
* Body: { printeragentId?: number, agentprinterIds: number[] }
|
||||
* → { agentprinterIds: number[] }
|
||||
*/
|
||||
order({ printeragentId, agentprinterIds }) {
|
||||
const body = {
|
||||
agentprinterIds: Array.isArray(agentprinterIds) ? agentprinterIds.map(Number) : [],
|
||||
};
|
||||
if (printeragentId != null) {
|
||||
body.printeragentId = Number(printeragentId);
|
||||
}
|
||||
return http('/api/agentprinter/order', {
|
||||
method: 'PUT',
|
||||
body: {
|
||||
printeragentId: Number(printeragentId),
|
||||
agentprinterIds: Array.isArray(agentprinterIds) ? agentprinterIds.map(Number) : [],
|
||||
},
|
||||
body,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user