mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 14:44:31 +00:00
Undo ctm service modifications
This commit is contained in:
parent
81383f3562
commit
02dac8e579
@ -8,14 +8,16 @@ const _ = require('lodash');
|
||||
|
||||
module.exports = {
|
||||
fetchAll: async (params, query) => {
|
||||
// Find entries using `queries` system
|
||||
const convertedParams = strapi.utils.models.convertParams(
|
||||
params.model,
|
||||
_.omit(query, ['source', 'populate']),
|
||||
);
|
||||
const { limit, skip = 0, sort, query : request, queryAttribute, source, page, populate = [] } = query;
|
||||
|
||||
console.log(convertedParams);
|
||||
return await strapi.query(params.model, query.source).find(convertedParams, query.populate || []);
|
||||
// Find entries using `queries` system
|
||||
return await strapi.query(params.model, source).find({
|
||||
limit,
|
||||
skip,
|
||||
sort,
|
||||
where: request,
|
||||
queryAttribute,
|
||||
}, populate);
|
||||
},
|
||||
|
||||
count: async (params, source) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user