-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added Delete Method to Project #68
base: main
Are you sure you want to change the base?
Conversation
#11 Closely followed model provided
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.
some small comments. But adding unit tests will be good as well and manual testing through Postman after we are able to populate the database
import uuid | ||
|
||
# delete a project | ||
@project.route("/<project_uuid>", METHODS=["DELETE"]) |
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.
I think this has to be @project.route("/<UUID:project_uuid>", METHODS=["DELETE"])
but to simplify things I think @project.route("/<UUID:id>", METHODS=["DELETE"])
will be good enough
@project.route("/<project_uuid>", METHODS=["DELETE"]) | ||
# Login Required | ||
def delete_project(id): | ||
project = Project.query.filter_by(project_id=id).first() |
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.
...filter_by(project_id=id)...
I think in our tables we store it as id
and not project_id
Closely followed model provided
Summary
Added delete endpoint for user projects
Test Plan
How did you test your changes?
Related Issues
#12
Which issues does this PR resolve/work on?
Closes #11