Regaez / grav-plugin-api

A REST API plugin for GravCMS
MIT License
27 stars 6 forks source link

refactor: improve validation of Resource filter input #34

Closed Regaez closed 5 years ago

Regaez commented 5 years ago

The app pulls a string array from the plugin config, which is editable by the user. This could therefore be malformed and not what is expected. This should be validated first and any unsuitable values should be discarded.

Should the whole filter be discarded, or just the "incorrect" values? Leaning towards retaining a partial filter, rather than returning all Resource attributes if only one filter field is incorrect.

Regaez commented 5 years ago

Resolved by #50