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

feat(admin_obligation_types): Admin apis to create, delete and get obligation types #90

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

deo002
Copy link
Collaborator

@deo002 deo002 commented Oct 29, 2024

Changes

  • Added admin APIs to create, delete and get a list of obligation types.
  • POST /obligations/types: Creates a new obligation type if not already present. It must be non-empty and uppercase. If the obligation type to be created is already in db with 'active' flag set to false, it is changed to true.
  • DELETE /obligation/types/{type}: The {type} is soft-deleted if it exists in db, has 'active' flag set to true and no obligation references it.
  • GET /obligations/types: Fetches a list of all obligation types. Flag 'active' can be set to false to fetch the inactive types.
  • During obligation creation and updation, associate them with only active obligation types.

Submitter Checklist

  • Includes tests (if there is a feature changed/added)
  • Includes docs ( if changes are user facing)
  • I have tested my changes locally.

pkg/api/obligationTypes.go Outdated Show resolved Hide resolved
pkg/api/obligationTypes.go Outdated Show resolved Hide resolved
@deo002 deo002 force-pushed the feat/admin_obligations branch 2 times, most recently from f9853b4 to 2127a66 Compare November 7, 2024 06:46
Copy link
Member

@GMishx GMishx left a 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.

@GMishx GMishx merged commit a082737 into fossology:main Nov 7, 2024
13 checks passed
@GMishx GMishx deleted the feat/admin_obligations branch November 7, 2024 10:23
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.

2 participants