-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add scaffold to extend commitment duration depending on its config * Implement functionality to scuffold * Extension: use created_at date as basis, not now() * Align unit test to check for creation_date specifically * Rename API from extend to update duration * Adjust duration extension check to use direct date methods * Add documentation * Remove compareTo helper method replace it with a string compare * Fix leftovers wich mentioned extend-duration * Update internal/api/commitment.go Change provided duration check to a slice contain instead of checking their string representations. Co-authored-by: Stefan Majewsky <[email protected]> * Fix message attributes wich were undefined due to last commits changes * Omit explicit db transaction due to having only 1 operation on the database * Adjust error message and return state on forbidden duration conversion * Reject expired or superseded commitments * Fix unit test clock on last case * Replace wording in test comments replace date with the proper word duration --------- Co-authored-by: Stefan Majewsky <[email protected]>
- Loading branch information
Showing
4 changed files
with
252 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters