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:
Norm Rasmussen
2024-09-02 20:42:31 -04:00
parent 6323f577de
commit 0c3af4c0fd
4 changed files with 69 additions and 32 deletions

View File

@ -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