19 Commits

Author SHA1 Message Date
Pierre Noël
f8f7a4a89f
fix mongo preview when array is missing (#8887) 2020-12-14 12:01:27 +01:00
Alexandre Bodin
e630cee0c9 Small refactoring to make the code easier to read 2020-12-10 11:17:41 +01:00
Convly
a415638848 mongoose:buildQuery : add the sort operator after the query matches, handle id=>_id, optimize the reorder by ids 2020-12-10 10:02:29 +01:00
Convly
0096024de6 Fix deep filtering / sort on mongodb
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-12-08 16:56:21 +01:00
Convly
92451db825 Add deep sort to mongoose, fix sort order on both connectors, cleanup
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-12-08 16:56:21 +01:00
Alexandre Bodin
07e7cfc0bd Make lint stricter and fix the errors
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-02 19:41:42 +01:00
Convly
07c38420d4 Fix buildQuery for polymorphic relations
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-10-19 15:42:32 +02:00
Convly
e1e2dd3419 Remove unnecessary custom option from query
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-10-19 15:39:56 +02:00
Convly
03f5342123 Fix deepFiltering with draft & publish
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-10-19 15:39:56 +02:00
Jean-Sébastien Herbaux
b2b4515d9b
Fix D&P population (#8249)
* Fix D&P population (gql, rest)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix units tests

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix mongoose filtering on non draft & publish model

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>

Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-08 20:54:48 +02:00
Jean-Sébastien Herbaux
c4716d5668 [D&P] Return published content by default from get apis (#7657)
* Add _publicationState request param / Returns live by default for CT that have D&P activated

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-09-22 17:39:46 +02:00
Alexandre Bodin
38d67fc873 Fix mongo issues
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 16:07:11 +02:00
Alexandre Bodin
966d9c554f Move hasDeepFilters to utils
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:36:26 +02:00
Alexandre Bodin
6776a3ce46 Add mongo support
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:36:24 +02:00
Pierre Noël
970a470034 add tests + make role decription optional + refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 10:59:34 +02:00
Pierre Noël
10092f5a57 refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-01 11:59:33 +02:00
Pierre Noël
950a21469f add filtering to search route
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-06-30 15:50:52 +02:00
Alexandre Bodin
2886bb7acb Add manyWay lookup match expr and fix conversion of id and _id type for mongoose match 2020-01-07 12:51:21 +01:00
Alexandre Bodin
66b2d4f5c3 Init 2019-10-23 17:02:23 +02:00