Skip to content

Commit

Permalink
fix: replace get by createStandardSearch (#809)
Browse files Browse the repository at this point in the history
* RM#87258
  • Loading branch information
gca-axelor authored Nov 21, 2024
1 parent 6ec140a commit b2ca1a9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
5 changes: 5 additions & 0 deletions changelogs/unreleased/87258.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Modules: improved search to remove the 40-response limit",
"type": "fix",
"packages": "core"
}
14 changes: 10 additions & 4 deletions packages/core/src/api/meta-module-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import {axiosApiProvider} from '../apiProviders';
import {createStandardSearch} from '../apiProviders';

export const getAllMetaModules = () => {
return axiosApiProvider.get({url: 'ws/rest/com.axelor.meta.db.MetaModule'});
};
export async function getAllMetaModules({}) {
return createStandardSearch({
model: 'com.axelor.meta.db.MetaModule',
fieldKey: 'core_module',
numberElementsByPage: null,
page: 0,
provider: 'model',
});
}
4 changes: 4 additions & 0 deletions packages/core/src/models/objectFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ export const core_modelAPI: ObjectFields = {
}),
),
}),
core_module: schemaContructor.object({
moduleVersion: schemaContructor.string(),
name: schemaContructor.string(),
}),
};

0 comments on commit b2ca1a9

Please sign in to comment.