- By default only accepts 'application/json'
- Routes that need different content-type, can call post or put with
additional arguments, one per content-type you need to support.
- 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
This simplifies stores to just be storage interaction, they no longer react to events.
Controllers now call services and awaits the result from the call.
When the service calls are returned the database is updated.
This simplifies testing dramatically, cause you know that your state is
updated when returned from a call, rather than hoping the store has
picked up the event (which really was a command) and reacted to it.
Events are still emitted from eventStore, so other parts of the app can
react to events as they're being sent out.
As part of the move to services, we now also emit an application-created
event when we see a new client application.
Fixes: #685Fixes: #595
- 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>
When an application updates metrics for a toggle we now
stores the timestamp on the toggle when it was last seen
used by an application. This will make it much easier to
detect toggles not in use anymore.
closes#642
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.