1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

13 Commits

Author SHA1 Message Date
Christopher Kolstad
063d3f0e4a
Make feature-toggle-store return 409
- After seeing frontend behaviour where the user could add the same
tag multiple times, and not get errors or be stopped doing so, we'll
change the backend to return a 409 if you tag a feature with a tag it
already has.

- Previous to this commit, the setup was to do `onConflict().ignore()`
  which caused the frontend to not get any help from the backend as to
  whether or not the operation was allowed

- This fix adds a custom error and adds a branch to the handleError util
  method for handling just that error type with a 409.

- This caused a couple of tests to receive 409, probably due to
  insufficient cleanup between tests. Adding faker as a dev-dependency and randomising
  toggle names and tag values for each test reduces the chance that
  we'll run into duplicate issues in the future for the tests that
  touches this problem

fixes: #711
2021-02-08 16:22:15 +01:00
Christopher Kolstad
43801f1f13
Add Tags and tag types
- First iteration of api for tags and tag-types
- Documentation in place
- Adds three new tables
   - tag_types
   - tags
   - feature_tag
- Tagging a feature is adding a row in the feature_tag
  join table

* #665

Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-01-14 13:09:05 +01:00
Ivar Conradi Østhus
b644071a34 feat: Add technical support for projects 2020-11-23 21:47:51 +01:00
Ivar Conradi Østhus
1e26c64912 fix: Name conflict should return 409
closes #509
2020-09-25 22:14:31 +02:00
Ivar Conradi Østhus
acc674c0e7 fix: replace @hapi/joi with joi 2020-07-31 22:15:09 +02:00
Ivar Conradi Østhus
d01c9d2dac
fix: use airbnb lint rules directly (#583)
This drops usage of finn-eslint rules as they are no
longer maintained.
2020-04-14 22:29:11 +02:00
Ivar Conradi Østhus
8d90aa1b0b fix: upgrade @hapi/joi to version 17.1.0 2020-02-21 22:14:40 +01:00
Ivar Conradi Østhus
b532c86695 fix: Upgrade to @hapi/joi (#543) 2020-02-20 08:34:32 +01:00
ivaosthu
ccaab0c47b fix: LogProvider as option injected to unleash.
Instead of instructing users to do static calls
in to Unleash, she should instead be allwed to
specify the log provider as an option to Unleash.

This commit introduces the "getLogger" option,
a function responsible for creating a logger.
2020-02-20 08:34:24 +01:00
ivaosthu
e256db29a5 fix(http-status): Client errors should use 400 status codes 2020-02-20 08:34:19 +01:00
ivaosthu
d5db78d140 chore(modernize): Use joi for url-friendly name validation 2020-02-20 08:34:18 +01:00
ivaosthu
3c8e51118e chore(modernize): Admin cleanup error-handlers 2020-02-20 08:34:18 +01:00
ivaosthu
39bc265daf chore(modernize): Use joi schema-validation in FeatureController 2020-02-20 08:34:17 +01:00