Jump to conversation
Unresolved conversations (0)
Nice work!

Nice work!

All of your conversations have been resolved.

Resolved conversations (9)
@Convly Convly May 2, 2022
```suggestion strapi.sanitizers.add('content-api.output', sanitizers.defaultSanitizeOutput);```
Outdated
...gins/users-permissions/server/register.js
@Convly Convly May 2, 2022
You're exporting sanitize from utils; why not require it from there?
...gins/users-permissions/server/register.js
iicdii
Kim, Harim
@Convly Convly May 2, 2022
Same as above but with `content-api.output`
Outdated
packages/core/utils/lib/sanitize/index.js
@Convly Convly May 2, 2022
If we apply what's been said above, you could refactor this piece of code like that, what do you think? ```suggestion strapi.sanitizers .get('content-api.input') .forEach(sanitizer => transforms.push(sanitizer(schema))); ```
Outdated
packages/core/utils/lib/sanitize/index.js
iicdii
Kim, Harim
@Convly Convly May 2, 2022
Maybe we could add a default value (empty array) here?
Outdated
.../strapi/lib/core/registries/sanitizers.js
@Convly Convly May 2, 2022
I would init this object to `{}` & delegate the creation of the `content-api` key to a loader ([similar to what we have for the admin](https://github.com/strapi/strapi/blob/master/packages/core/strapi/lib/core/loaders/admin.js)). What do you think?
Outdated
.../strapi/lib/core/registries/sanitizers.js
iicdii Convly
Kim, Harim and Jean-Sébastien Herbaux
@Convly Convly May 2, 2022
Could you return `this` here? (to add chaining capability)
.../strapi/lib/core/registries/sanitizers.js
@Convly Convly May 2, 2022
What do you think of adding a way to register new sanitizers? Something/A method to add a new key somewhere in the sanitizers object? IMO, it could be useful for plugin creators, etc... Smth like ```js set(path, value = []) { _.set(sanitizers, path, value); return this; } ```
.../strapi/lib/core/registries/sanitizers.js
iicdii
Kim, Harim
@Convly Convly Mar 8, 2022
Users-Permissions should be treated as a plugin and thus shouldn't be coupled with the Strapi core
Outdated
packages/core/utils/lib/sanitize/index.js