Skip to content

Conversation

@Kariamos
Copy link
Contributor

This pull request updates the PUT /dossiers/:id/agreements endpoint to allow setting the tokens value to zero, and adds a corresponding test to ensure this behavior is handled correctly. The main changes are:

Validation logic update:

  • Modified the validation in RouteItem to allow tokens to be zero, only rejecting negative values instead of non-positive values. This enables setting tokens to zero via the API.

Testing improvements:

  • Added a test case to verify that updating tokens to zero is accepted and correctly updates the database, with the endpoint returning a 200 status.

@github-actions
Copy link

Tests difference:

New Tests

< Valid body - Should update the tokens usage and return 200 also with tokens=0

@d-beezee d-beezee merged commit 773c1d2 into main Dec 12, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants