-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added new category field in obligations #93
feat: added new category field in obligations #93
Conversation
pkg/models/types.go
Outdated
@@ -453,6 +477,11 @@ func (o *Obligation) BeforeUpdate(tx *gorm.DB) (err error) { | |||
return fmt.Errorf("obligation classification must be one of the following values:%s", allClassifications) | |||
} | |||
} | |||
|
|||
if err := validateCategory(o); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d2d163d
to
38710ad
Compare
38710ad
to
58fc24c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, working as expected
@deo002 please fix the CI lint error |
58fc24c
to
8b25459
Compare
Changes
Added category field with fixed enums for obligation GET api.
Updated the obligation POST, PATCH requests accordingly.
Validation for the new field is also added.
Fixes New field "Category" in obligations GET, PUT, POST #85
Submitter Checklist
References