u
This commit is contained in:
@@ -175,12 +175,13 @@ export function register(app, basePath = '') {
|
||||
return res.status(400).json({ error: selected.error });
|
||||
}
|
||||
|
||||
const { number, date, entityId, lines } = req.body ?? {};
|
||||
const { number, date, createdAt, entityId, lines } = req.body ?? {};
|
||||
|
||||
try {
|
||||
const order = await db.create(req.user.id, {
|
||||
number,
|
||||
date,
|
||||
createdAt,
|
||||
entityId,
|
||||
lines,
|
||||
});
|
||||
@@ -396,6 +397,9 @@ export function register(app, basePath = '') {
|
||||
if (Object.prototype.hasOwnProperty.call(body, 'date')) {
|
||||
patch.date = body.date;
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(body, 'createdAt')) {
|
||||
patch.createdAt = body.createdAt;
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(body, 'entityId')) {
|
||||
patch.entityId = body.entityId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user