Moving things to use the common_route_params. Rewriting most of things order and order_cart related! Updating address and contact related. General code clean up.

This commit is contained in:
Scott Idem
2022-01-18 18:49:23 -05:00
parent 49d8a7f0dc
commit 24807db81c
10 changed files with 216 additions and 502 deletions

View File

@@ -88,11 +88,15 @@ def mk_resp(
if response:
log.debug(response)
if status_code == 400: response.status_code = status.HTTP_400_BAD_REQUEST
if status_code == 400:
log.warning('Likely bad request')
response.status_code = status.HTTP_400_BAD_REQUEST
elif status_code == 401: response.status_code = status.HTTP_401_UNAUTHORIZED
# elif status_code == 402: response.status_code = status.HTTP_402_X
elif status_code == 403: response.status_code = status.HTTP_403_FORBIDDEN
elif status_code == 404: response.status_code = status.HTTP_404_NOT_FOUND
elif status_code == 404:
log.info('No results')
response.status_code = status.HTTP_404_NOT_FOUND
elif status_code == 408: response.status_code = status.HTTP_408_REQUEST_TIMEOUT
elif status_code == 429: response.status_code = status.HTTP_429_TOO_MANY_REQUESTS
elif status_code == 500: response.status_code = status.HTTP_500_INTERNAL_SERVER_ERROR