From 9dd5ef881ce740ff60f52759f8f24ff5a53d4a73 Mon Sep 17 00:00:00 2001 From: byanofsky Date: Fri, 9 Jun 2017 10:19:40 -0700 Subject: [PATCH] fix: Change response status codes to 301 POST, PUT, and DELETE requests in endpoints2 solution code return responses with 301 status code. This allows solution code to be tested with 'endpoints_tester2.py' and return 'ALL TESTS PASSED!!' --- .../Solution Code/endpoints_project2sol.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lesson_3/04_Responding to Different Types of Requests/Solution Code/endpoints_project2sol.py b/Lesson_3/04_Responding to Different Types of Requests/Solution Code/endpoints_project2sol.py index 0f0303d..bd341c4 100644 --- a/Lesson_3/04_Responding to Different Types of Requests/Solution Code/endpoints_project2sol.py +++ b/Lesson_3/04_Responding to Different Types of Requests/Solution Code/endpoints_project2sol.py @@ -11,7 +11,7 @@ def puppiesFunction(): elif request.method == 'POST': #Call the method to make a new puppy - return makeANewPuppy() + return makeANewPuppy(), 301 #Make another app.route() decorator here that takes in an integer id in the @@ -22,10 +22,10 @@ def puppiesFunctionId(id): return getPuppy(id) if request.method == 'PUT': #Call the method to update a puppy - return updatePuppy(id) + return updatePuppy(id), 301 elif request.method == 'DELETE': #Call the method to remove a puppy - return deletePuppy(id) + return deletePuppy(id), 301 def getAllPuppies():