v0.3.0 (Comments & Foreign Keys)
v0.3.0
v0.3.0 Adds the comments model for commenting on posts or other comments. This version also sees the introduction of foreign key & foreign key array schema items. These new item types allow you to make references to existing models and helps manage what happens when those references are removed. See below for a full list of changes:
- Removed foreign keys from target when source is deleted - see a030bdc
- Added 'postUpsert' & postDelete function to schema and items so that hooks can be made after successful insert or update - see 0d21231, b70a58d
- Updated comments test coverage, includes basic endpoints as well as foreign key/id arrays - see 560801f
- Added async/await to comments and expanded on options for endpoints - see 3b4f65c
- Added foreign key functionality to schema id arrays. Also added a depth & filter for when expanding foreign key objects during serialization - see 4b522c3
- Updated definition files, added array foreign key dependencies and foreign key filters - see a8a94f2
- Added 'children' to comments model - see 270f347
- Added an endpoint for getting comments that are children of a parent ID - see ddd068d
- Added check for foreign key depth traversal - see ea433d4
- Implemented foreign key depth traversal feature. Allows you to set a limit to how deep foreign key instance retrieval goes - see 6128276
- Comment GET endpoints now expand foreign keys if expanded property provided - see 93ff59c
- Bug fix: foreign keys do not get expanded value if null - see 85a2ad0
- Bug fix: Fixed logical errors in the comment tests - see d6e3458
- Bug fix: getUsers endpoint incorrectly assumed 'user' parameter as mongo ID - see e80fe10
- Added a userExists route to help with checking for existing users - see 1954b41
- Added a longer timeout for testing comments - see 7db455d
- Merge branch 'dev' of github.com:MKHenson/modepress into dev - see 81dfe24
- Fixed bug with foreign key deletion in models - see be155f8
- Updated the endpoint structure of the comments controller - see afbe843
- Set the comments 'parent' schema item to optional - see 2e141c3
- Added example debug file for visual code - see b91db03
- Added a log message to help identify which controller is crashing - see 097adbd
- Added tests for comment creation and deletion - see c183687
- Expanded the permission controller to check if the target user exists if its specified - see aaba41a
- Updated comments tests - see 35f468a
- Added verification to foreign keys to make sure the target exists - see 1676417
- Expanded the hasId function to include the ability to not check for optional Ids - see 7804994
- Renamed comment model 'target' to 'post' and 'responseTarget' to 'parent' - see 4c8022c
- Bug fix: added trailing slash to post controller endpoints - see 2131ae3
- Updated post + comment endpoints to use hasId function with parameters - see 67116c0
- Expanded hasId function to check ID's dynamically - see aba2d41
- Split index.js into separate modules - see 408948c
- Updated docs to point to index.js - see c6bf7a0
- Renamed test.js to index.js - see 3f9bb8c
- Added tests for basic comment polling. See #14 - see 81cf441
- Updated comments functions to use async/await - see 1cc8fb7
- Updated comment model to use foreign key. See #14 - see 363b953