Logo
Explore Help
Register Sign In
yujunjun/strapi
1
0
Fork 0
You've already forked strapi
mirror of https://github.com/strapi/strapi.git synced 2025-07-27 10:56:36 +00:00
Code Issues Packages Projects Releases Wiki Activity
strapi/packages/core/utils/lib/pipe-async.js

12 lines
168 B
JavaScript
Raw Normal View History

[V4] Enhanced sanitize & remove restricted relations from content API's payloads (#11411) * 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
2021-11-04 15:47:53 +01:00
'use strict';
Move pipeAsync to @strapi/utils
2021-11-04 16:43:27 +01:00
module.exports = (...methods) => async data => {
[V4] Enhanced sanitize & remove restricted relations from content API's payloads (#11411) * 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
2021-11-04 15:47:53 +01:00
let res = data;
for (const method of methods) {
res = await method(res);
}
return res;
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 1453ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API