This commit is contained in:
seb
2026-09-26 07:34:35 +02:00
parent 67758d5ec2
commit f0176e0fe0
19 changed files with 106 additions and 8 deletions

View File

@@ -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;
}