products GET-> add gtin to if and dont get all if gtin is specified
This commit is contained in:
parent
0d6b41abcf
commit
6844b1fb24
@ -13,8 +13,8 @@ async function get(req: Request, res: Response) {
|
||||
} else {
|
||||
log.api?.debug('GET products Success:', req.query, value);
|
||||
|
||||
if (value.search !== undefined || value.id !== undefined) {
|
||||
// if search or get by id
|
||||
if (value.search !== undefined || value.id !== undefined || value.gtin !== undefined) {
|
||||
// if search or get by id/gtin
|
||||
await db
|
||||
.$transaction([
|
||||
// Same query for count and findMany
|
||||
|
Loading…
x
Reference in New Issue
Block a user