Skip to content

Commit

Permalink
Merge pull request #29 from rodekruis/chore.small_fixes
Browse files Browse the repository at this point in the history
update logging kobo-to-121
  • Loading branch information
tijsziere authored Mar 29, 2024
2 parents 7fa9ba0 + 1c46a4b commit 05962dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,13 @@ async def kobo_to_121(request: Request, dependencies=Depends(required_headers_12
json=[payload]
)
target_response = response.content.decode("utf-8")

if "debug" in request.headers.items():
logger.info(payload)

logger.info(target_response)

if response.status_code != 201:
logger.error("wrong request: ", response.status_code, target_response)
logger.info(payload)

return JSONResponse(status_code=response.status_code, content=target_response)

########################################################################################################################
Expand Down Expand Up @@ -565,6 +566,7 @@ async def create_121_program_from_kobo(request: Request, dependencies=Depends(re
],
"enableMaxPayments": lookupdict['enableMaxPayments'].upper() == 'TRUE',
"allowEmptyPhoneNumber": False,
"budget": lookupdict['budget']
"enableScope": False
}

Expand Down

0 comments on commit 05962dd

Please sign in to comment.