mirror of
https://github.com/strapi/strapi.git
synced 2025-07-27 19:10:01 +00:00

* Rework sanitizeEntity, first iteration * remove console.log * Remove useless comments * Fix e2e tests * Fix up user e2e test * Fix remove-restricted-relations visitor * Handle grapqhql resolver, prevent access to restricted relations * Handle polymorphic relation in the related visitor * Remove morph attribute if empty * Use only the find action to check if the relation is allowed
16 lines
205 B
JavaScript
16 lines
205 B
JavaScript
'use strict';
|
|
|
|
const pipeAsync = (...methods) => async data => {
|
|
let res = data;
|
|
|
|
for (const method of methods) {
|
|
res = await method(res);
|
|
}
|
|
|
|
return res;
|
|
};
|
|
|
|
module.exports = {
|
|
pipeAsync,
|
|
};
|