0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
ghost/test/regression/api/canary/admin
naz 51c9a50c4f
Added validation layer to members import endpoint (#12131)
no issue

- Additional validation is needed for imported data because in case of bulk insertions (through knex) we bypass model layer validation - this could lead to invalid data in the database, which would be hard to fix.
- Chose validation method we use for other endpoints - through JSON Schema. It proved to be very performant (200ms overhead for 50k records). When comparing it with iterative method (validating each record separately) this was adding about 17s of overhead.
- Refactored returned values from "sanitizeInput" method to encapsulate more logic so that the caller doesn't have to calculate amount of invalid records and deal with error types
- Whole sanitizeInput method could now be easily extracted into separate module (somewhere close to members importer)
- Bumped members-csv package. It is meant to handle empty string values - '' and null, which should allow validating member records more consistently!
2020-08-17 23:28:57 +12:00
..
authentication_spec.js Extracted core/server/lib/security to @tryghost/security package 2020-08-11 14:06:50 +01:00
db_spec.js Removed final non-destructured imports of core/server/lib/common (#11858) 2020-05-28 17:54:18 +01:00
identities_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
images_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
labels_spec.js Added more specific error handling when adding duplicate labels 2020-06-05 00:23:10 +12:00
members_signin_url_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
members_spec.js Added validation layer to members import endpoint (#12131) 2020-08-17 23:28:57 +12:00
notifications_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
pages_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
posts_spec.js 🐛 Fixed cache invalidation for published posts with no content 2020-07-15 17:41:24 +12:00
redirects_spec.js Fixed Redirects API regression tests 2020-06-16 10:24:13 +02:00
schedules_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
settings_spec.js Added amp_gtag_id setting migration & default 2020-07-15 13:43:25 +02:00
slack_spec.js Removed final non-destructured imports of core/server/lib/common (#11858) 2020-05-28 17:54:18 +01:00
users_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
utils.js Added ?search= param to Admin API members endpoint (#11854) 2020-05-28 10:14:02 +01:00
webhooks_spec.js Fixed integration_id assignment for webhook when creating through API key auth 2020-08-04 16:43:24 +12:00