@Lam_Le_Vu Though js can not find the type, but you can use toString() print the function you apply. in you code’s async function, you can do console print:
console.log(strapi.plugin('users-permissions').services.user.fetchAll.toString())
then you will find the fetchAll function’s args should be like {where: params, populate}:
fetchAll(params, populate) {
return strapi.query('plugin::users-permissions.user').findMany({ where: params, populate });
}
then you console log findMany
findMany(params) {
return db.entityManager.findMany(uid, params);
}
then you will find it maybe use db queryEngine, then find in strapi docs of db query engine, findMany here : Single Operations for Query Engine API - Strapi Developer Docs
found that where should be an object, I think the error caused here. I hope it can help.
then find where details Filtering Operations for Query Engine API - Strapi Developer Docs
