Skip to content
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

chore(api): unify API input/output #24

Merged
merged 4 commits into from
Jan 4, 2024
Merged

chore(api): unify API input/output #24

merged 4 commits into from
Jan 4, 2024

Conversation

GMishx
Copy link
Member

@GMishx GMishx commented Dec 20, 2023

  1. Make API input/outputs more consistent like by removing user password from endpoint response.
  2. Divide api.go into smaller files based on functionality.
  3. Make /obligations endpoint filter based on active/inactive obligations.
  4. Do not update license if it's flag is set to 2 (manually updated).
  5. Add column names to models.LicenseDB to allow easy functioning of /search endpoint.
  6. Add column name to models.Obligation active field for consistent filtering.
  7. Make license shortname non-updatable field.

1. Hide user password from `/users` endpoints.
2. Prevent update of license shortname and id.
3. Do not update license if flag is 2.

Signed-off-by: Gaurav Mishra <[email protected]>
Check if obligation text is updatable before
updating the text in DB.

Signed-off-by: Gaurav Mishra <[email protected]>
Fix filtering of active/inactive obligations by
using query string instead of struct format of
gorm. Since gorm takes only non-zero values and
false is thus removed.

Signed-off-by: Gaurav Mishra <[email protected]>
@GMishx GMishx requested review from ag4ums, avinal and k-avy December 20, 2023 06:31
@GMishx GMishx merged commit b123f6b into main Jan 4, 2024
4 checks passed
@GMishx GMishx deleted the chore/api/unify branch January 4, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant