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(router): added api for the deleting config key #3554

Merged
merged 9 commits into from
Feb 22, 2024

Conversation

tanbirali
Copy link
Contributor

@tanbirali tanbirali commented Feb 5, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Added the api to delete config key
Fixes #3488

How did you test it?

  • Create a config.
curl --location 'http://localhost:8080/configs/' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
    "key":"keke",
    "value": "keke"
}'
  • Delete the config
curl --location --request DELETE 'http://localhost:8080/configs/keke' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin'
  • Get the config
curl --location --request GET 'http://localhost:8080/configs/keke' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin'

It should return 404

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code

@tanbirali tanbirali requested review from a team as code owners February 5, 2024 14:59
@tanbirali tanbirali changed the title Delete config api feat(router): added api for the deleting config key Feb 5, 2024
crates/router/src/routes/configs.rs Outdated Show resolved Hide resolved
crates/router/src/core/configs.rs Outdated Show resolved Hide resolved
crates/router/src/routes/configs.rs Outdated Show resolved Hide resolved
crates/router/src/routes/configs.rs Outdated Show resolved Hide resolved
@tanbirali
Copy link
Contributor Author

Made the changes please have a look

@SanchithHegde SanchithHegde added C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Feb 11, 2024
crates/router/src/routes/configs.rs Outdated Show resolved Hide resolved
crates/router/src/routes/configs.rs Outdated Show resolved Hide resolved
tanbirali and others added 2 commits February 12, 2024 15:24
Co-authored-by: Kartikeya Hegde <karthihegde010@gmail.com>
Co-authored-by: Kartikeya Hegde <karthihegde010@gmail.com>
@dracarys18
Copy link
Member

@tanbirali Compilation is failing and many things are being missed here. I have fixed them in this commit 089551b. Can you do

git fetch https://github.com/juspay/hyperswitch.git delete-config-api
git cherry-pick 089551b69e64f13968f93e1d3707e2262bac068b

on your PR

@tanbirali
Copy link
Contributor Author

Oh I need help, I think I have messed up, here what I did, I fetched the url you shared conflict aroused to accepted the incoming changes, then staged them and committed them as well, then ran the cherry pick command which responded with nothing to commit and when I am trying to push I am getting you have not concluded your cherry pick, can you help me figure it out.

@dracarys18
Copy link
Member

dracarys18 commented Feb 15, 2024

Oh I need help, I think I have messed up, here what I did, I fetched the url you shared conflict aroused to accepted the incoming changes, then staged them and committed them as well, then ran the cherry pick command which responded with nothing to commit and when I am trying to push I am getting you have not concluded your cherry pick, can you help me figure it out.

I am not sure why would fetch cause conflicts, but
You can do something like

git cherry-pick --abort
git reset --hard 8ce4777a7023f268c6d022941c246f3ac8ea5bea

And continue with the above changes I suggested, Make sure you are on your branch where you are making changes

@tanbirali
Copy link
Contributor Author

Done as you told let me know if it worked

Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Thanks for the PR, @tanbirali!

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Feb 22, 2024
Merged via the queue into juspay:main with commit bbb3d3d Feb 22, 2024
15 checks passed
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Feb 22, 2024
@tanbirali tanbirali deleted the delete-config-api branch May 19, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Create a delete endpoint for Config Table
5 participants