Jozef Cipa
808b2a464f
Handle duplicate entry error ( #8367 )
...
* Handle duplicate entry error message in bookshelf connector
Signed-off-by: jozefcipa <jozef.cipa@strv.com>
* Handle duplicate error message in mongoose connector
Signed-off-by: jozefcipa <jozef.cipa@strv.com>
* Apply changes from review
* Fix wrapping transactions in bookshelf adapter
* Add missing await to wrapErrors
* Call findOne without this
2021-01-25 14:03:48 +01:00
Jozef Cipa
a48f9f3327
Fix lower() error when running on non-string column ( #8419 )
...
Signed-off-by: jozefcipa <jozef.cipa@strv.com>
2021-01-21 11:36:17 +01:00
Anthony Nguyen
b4f75fd7a6
Add min:0 to templates of Bookshelf DBs. Issue #8436 ( #9155 )
...
* Add min:0 to templates of Bookshelf DBs. Issue #8436
* Moving default property from db template to knex.js
* Move min to pool
2021-01-18 14:14:39 +01:00
Pierre Noël
70ffd7c65b
Fix CM limited to show only 100 entries ( #9118 )
...
* fix mongo count
* harmonize code between mongoose and bookshelf
* refacto
2021-01-13 20:15:45 +01:00
Pierre Noël
08f9b05d21
Fix query when filtering and sorting on a relational field ( #9045 )
...
* fix query when filtering and sorting on a relational field
* add tests + refacto
* remove useless code
2021-01-11 17:21:01 +01:00
Convly
c3a2c7024d
PR review adjustments
2021-01-08 10:09:10 +01:00
Convly
5bf9375381
First impl (wip)
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-08 09:52:21 +01:00
Alexandre Bodin
aa3d7eb2e0
Merge branch 'master' into feature/relational-fields
2020-12-17 12:58:34 +01:00
Pierre Noël
4a02c158b9
Fix migration when disabling dp on sqlite ( #8768 )
...
* fix migration disable dp on sqlite
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* fix mongo test
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* use context instead of migrationInfos
* refacto
* remove useless if
2020-12-17 12:33:00 +01:00
Alexandre BODIN
d6f5b0c572
Merge pull request #8829 from strapi/relational-fields/sort-by-relation
...
Relational fields/ Sort by relation
2020-12-10 14:05:56 +01:00
Pierre Noël
4b25c36739
Add count
2020-12-08 17:27:02 +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
Convly
95784438ce
Add nested sort to bookshelf queries
2020-12-08 16:56:21 +01:00
soupette
61a3740c06
Fix conflicts
...
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-11-23 14:43:07 +01:00
Alexandre BODIN
6558161227
Fix ML ( #8604 )
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-09 19:21:08 +01:00
Pierre Noël
60bf24ce8b
Fix query when populating morph relations ( #8548 )
...
* change query when populating morph relations
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-11-06 14:35:36 +01:00
Pierre Noël
ff5307e8b6
fix altercolumns db migration ( #8565 )
...
* fix alter-column db migration
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto of data migration + fix sqlite dp migration
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto create-migration-runner
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* fix migration
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-11-06 14:27:57 +01:00
Alexandre Bodin
4a32691c07
fix lint
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-03 16:14:31 +01:00
Alexandre Bodin
08a603623b
Cleanup tests
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-02 19:41:46 +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
Alexandre BODIN
81c684d7b4
Merge pull request #8314 from strapi/fix/dpMigration
...
fix d&p regressions
2020-10-20 14:08:49 +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
Pierre Noël
d84284faf2
refacto
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-10-16 18:54:10 +02:00
Pierre Noël
e2341e9b06
run creation/update of the database even if the model hasnt changed
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-10-16 18:54:10 +02:00
Pierre Noël
025eed964c
dont run d&p migration at CT creation + rebuild tables if there were deleted in DB
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-10-16 18:54:09 +02:00
Alexandre BODIN
b91059a522
Fix undefined pk ( #8260 )
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-09 17:08:37 +02:00
Alexandre BODIN
e87af3f6c6
do not set id to undefined ( #8232 )
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-07 23:11:00 +02:00
Jean-Sébastien Herbaux
e7861232d0
Fix wrong query generation with bookshelf ( #8228 )
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-10-07 23:10:38 +02:00
Alexandre Bodin
5f7fcafc5f
Fix publciationState for nested populations
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-06 10:08:30 +02:00
Alexandre Bodin
0df69c30ce
Allow setting the published_at field in the API
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-05 14:07:17 +02:00
Alexandre Bodin
c98089ff65
Merge branch 'master' into releases/3.2
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-05 12:00:03 +02:00
Jean-Sébastien Herbaux
e55ea1d6b5
Hide creator fields from public api by default ( #8052 )
...
* Add model option to hide/show creators fields in public API response
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Add content-types util, rework sanitize-entity's private handling
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Update search e2e tests, fix an issue on empty search for the core-api controller (find)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix GraphQL plugin (handle privates attributes on typeDefs + resolver builds)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix sanitizeEntity import
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Move doc update from beta to stable
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix e2e test
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix pr comments
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Remove creator's field from upload controller routes
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix typedef build for graphql association
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix pr (comments + several issues)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Add tests for search behavior in content-manager
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Rename files variables to meaningful names (upload controllers)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix test with search id matching serialNumber
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
* Add toHasBeenCalledWith check for config.get (utils/content-types.test.js)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-01 17:47:08 +02:00
Alexandre Bodin
9f00438471
Fix count queries
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-01 17:18:58 +02:00
Pierre Noël
a138695d95
fix missing hasTimestamp ( #8010 )
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-23 17:49:28 +02:00
Pierre Noël
7221412d68
Draft publish/validators ( #7853 )
...
* add validators for dz, components and relations
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:45:59 +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
Pierre Noël
74a85c1127
Add migration d&p
2020-09-22 17:39:40 +02:00
Pierre Noël
38216554d5
Draft publish/remove some validators for drafts ( #7537 )
...
* remove required + minLength validator for drafts
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:39:24 +02:00
Pierre Noël
e29c1b7de9
add published_at ( #7374 )
...
* add published_at
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:39:18 +02:00
Alexandre Bodin
8b6bf7fd10
Fix core_store init first
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-27 20:26:56 +02:00
Pierre Noël
6d825fc3ca
fix count with sort param
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-24 15:06:38 +02:00
Convly
20f80b2361
Better permissions-manager.sanitize behavior
...
Forbid empty arrays as fields for permissions (on ability creation)
Differentiate input from output sanitizing
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:38 +02:00
Alexandre Bodin
85ea0abdc8
Add condition
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:16 +02:00
Alexandre Bodin
4edad86029
Add basic created_by updated_by
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:16 +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
c8d743ef60
Cleanup and add tests
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:36:26 +02:00
Alexandre Bodin
82316bbf3a
Allow or operator and working with bookshelf
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:32:44 +02:00
Pierre Noël
3084b854d4
rename attributes -> values
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:53 +02:00
Pierre Noël
8598cee8d0
fourth refacto
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:52 +02:00
Pierre Noël
6a1d65bc37
third refacto
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:52 +02:00