Some issues with the migration project but I'll need to test them tomorrow... might have to create courses even if courses already exist?
This commit is contained in:
Binary file not shown.
@ -12,7 +12,7 @@ BASEURL = "https://api.northpass.com/v2"
|
||||
def get(url):
|
||||
try:
|
||||
get_response = requests.get(url, headers=HEADERS)
|
||||
# print(f"Executed Get Request. Status code is {get_response.status_code}")
|
||||
print(f"Executed Get Request. Status code is {get_response.status_code}")
|
||||
except HTTPError as h:
|
||||
print(
|
||||
f"Error occurred. Here's the info: {h} and status code: {get_response.status_code}"
|
||||
@ -48,11 +48,11 @@ def post(url, payload):
|
||||
|
||||
def delete(url):
|
||||
try:
|
||||
get_response = requests.delete(url, headers=HEADERS)
|
||||
# print(f"Executed Get Request. Status code is {get_response.status_code}")
|
||||
delete_response = requests.delete(url, headers=HEADERS)
|
||||
print(f"Executed Delete Request. Status code is {delete_response.status_code}")
|
||||
except HTTPError as h:
|
||||
print(
|
||||
f"Error occurred. Here's the info: {h} and status code: {get_response.status_code}"
|
||||
f"Error occurred. Here's the info: {h} and status code: {delete_response.status_code}"
|
||||
)
|
||||
finally:
|
||||
return get_response
|
||||
return delete_response
|
||||
|
||||
Reference in New Issue
Block a user