Compare commits
2 Commits
6844b1fb24
...
7b9fe95cd4
Author | SHA1 | Date | |
---|---|---|---|
7b9fe95cd4 | |||
09f06fb2ea |
@ -47,7 +47,7 @@ const schema_post = validator.object({
|
||||
// MARK: UPDATE products
|
||||
const schema_patch = validator
|
||||
.object({
|
||||
id: validator.number().positive().precision(0),
|
||||
id: validator.number().positive().precision(0).required(),
|
||||
gtin: validator
|
||||
.string()
|
||||
.min(8)
|
||||
|
@ -95,7 +95,7 @@ async function post(req: Request, res: Response) {
|
||||
.create({
|
||||
data: {
|
||||
name: value.name,
|
||||
code: value.code
|
||||
code: (value.code === '0000') ? null : value.code
|
||||
},
|
||||
select: {
|
||||
id: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user