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

Integrate DELETE with surreal delete method #12

Open
3 tasks
sbshah97 opened this issue Oct 17, 2023 · 0 comments
Open
3 tasks

Integrate DELETE with surreal delete method #12

sbshah97 opened this issue Oct 17, 2023 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@sbshah97
Copy link
Owner

sbshah97 commented Oct 17, 2023

What happens right now?

Right now this returns 4xx

How do I reproduce / test this

curl --location --request DELETE 'http://localhost:8080/users/{userId}'

What needs to be done?

  • Go to main.go and create a new route called /users/:id/delete
  • This /users/:id/delete calls a new handler called DeleteUsers which is present in handlers/users.go.
  • DeleteUsers should call database.Delete method which needs to be implemented.

A user will need to be created via the post method before deleting it. It will output a userID which can be used instead of userId

Similar PRs to look at

@sbshah97 sbshah97 added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant