This commit is contained in:
parent
0aa5c1b625
commit
b61342b576
@ -53,12 +53,13 @@ def create_share(fpath):
|
|||||||
async def home(request: Request):
|
async def home(request: Request):
|
||||||
try:
|
try:
|
||||||
payload = await request.json()
|
payload = await request.json()
|
||||||
|
request.app.state.log.info(f"Received: {payload}")
|
||||||
file = payload["file"]
|
file = payload["file"]
|
||||||
link = create_share(file)
|
link = create_share(file)
|
||||||
if link:
|
if link:
|
||||||
app.state.log(f"Shared {file} on {link}")
|
request.app.state.log.info(f"Shared {file} on {link}")
|
||||||
else:
|
else:
|
||||||
app.state.log(f"{file} has already been shared!")
|
request.app.state.log.info(f"{file} already shared or failure!")
|
||||||
except Exception:
|
except Exception:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user