This commit is contained in:
parent
0aa5c1b625
commit
b61342b576
@ -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 {}
|
||||
|
||||
|
Reference in New Issue
Block a user