Fix logging
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-06-16 16:14:07 +02:00
parent 0aa5c1b625
commit b61342b576
Signed by: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 3 additions and 2 deletions

View File

@ -53,12 +53,13 @@ def create_share(fpath):
async def home(request: Request):
try:
payload = await request.json()
request.app.state.log.info(f"Received: {payload}")
file = payload["file"]
link = create_share(file)
if link:
app.state.log(f"Shared {file} on {link}")
request.app.state.log.info(f"Shared {file} on {link}")
else:
app.state.log(f"{file} has already been shared!")
request.app.state.log.info(f"{file} already shared or failure!")
except Exception:
return {}