Skip to content

Conversation

Frankielee2272
Copy link
Contributor

Able to create categories needs to connect front to backend

@Frankielee2272 Frankielee2272 requested a review from Adnel1 June 8, 2024 01:38
Copy link
Collaborator

@ElvisHernandez ElvisHernandez left a comment

Choose a reason for hiding this comment

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

Left some comments about things to change before merging @Adnel1

@@ -200,13 +201,13 @@ def create_category(user_id):

#Get all of user's categories
@api.route('/users/<int:user_id>/categories', methods=['GET'])
@jwt_required() # Requires a valid JWT token
# @jwt_required() # Requires a valid JWT token
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be an authenticated endpoint, i.e. @jwt_required should be set on this function

@@ -184,11 +184,12 @@ def search():
return jsonify({"error": "Error fetching data from API."}), 500

# Create category for user
@api.route('/users/<int:user_id>/categories', methods=['POST'])
@api.route('/users/<int:user_id>/category', methods=['POST'])
Copy link
Collaborator

Choose a reason for hiding this comment

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

This endpoint should be authenticated, i.e. should have @jwt_required

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