Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
b7eae378f9
10 files changed
+61
-12
No files matched your search
@@ -4,7 +4,9 @@ import ProductService from "../../../../services/product"
|
||||
export default async (req, res) => {
|
||||
const schema = Validator.object()
|
||||
.keys({
|
||||
q: Validator.string().required(),
|
||||
q: Validator.string()
|
||||
.required()
|
||||
.allow(""),
|
||||
offset: Validator.number().optional(),
|
||||
limit: Validator.number().optional(),
|
||||
filter: Validator.any(),
|
||||
|
||||
@@ -55,6 +55,10 @@ export class ProductRepository extends Repository<Product> {
|
||||
return []
|
||||
}
|
||||
|
||||
if (relations.length === 0) {
|
||||
return this.findByIds(entitiesIds, idsOrOptionsWithoutRelations)
|
||||
}
|
||||
|
||||
const groupedRelations: { [toplevel: string]: string[] } = {}
|
||||
for (const rel of relations) {
|
||||
const [topLevel] = rel.split(".")
|
||||
|
||||
Reference in new issue
Block a user