Skip to content

Commit

Permalink
feat: fga-eps-mds/2020.2-Lend.it#133 Changed route apperance
Browse files Browse the repository at this point in the history
  • Loading branch information
Thais-ra authored and lucasdutraf committed Apr 20, 2021
1 parent b61c6bc commit 0ba7d9e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions project/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ def get_all_request():
return jsonify(response), 200


@request_blueprint.route("/requests/available/<usermail>", methods=["GET"])
def get_all_available_requests(usermail):
@request_blueprint.route("/requests/available", methods=["GET"])
def get_all_available_requests():
usermail = request.args.get("usermail")

error_response = {"status": "fail", "message": "Request not found"}

available_requests = [
Expand All @@ -106,7 +108,7 @@ def get_all_available_requests(usermail):

response = {
"status": "success",
"data": {"available_requests": available_requests},
"data": {"available requests": get_category_name(available_requests)},
}
return jsonify(response), 200

Expand Down

0 comments on commit 0ba7d9e

Please sign in to comment.