Compare commits

..

No commits in common. "b61342b576f347c56fc8751c64107c6c072d4b5e" and "5b4fe5fc54499ad503f68e29dc417d6821f53e01" have entirely different histories.

3 changed files with 5 additions and 8 deletions

View File

@ -5,12 +5,10 @@ services:
app:
image: "decentral1se/pubspace:latest"
environment:
- APP_LOG_LEVEL
- MASTODON_ACCESS_TOKEN_FILE=/run/secrets/access_token
- MASTODON_API_BASE_URL
- NEXTCLOUD_API_BASE_URL
- NEXTCLOUD_APP_PASSWORD_FILE=/run/secrets/app_password
- NEXTCLOUD_USER
- MASTODON_API_BASE_URL
- APP_LOG_LEVEL
secrets:
- access_token
- app_password

View File

@ -12,5 +12,5 @@ run:
build:
@docker build -t decentral1se/pubspace .
push: build
push:
@docker push decentral1se/pubspace

View File

@ -53,13 +53,12 @@ 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:
request.app.state.log.info(f"Shared {file} on {link}")
app.state.log(f"Shared {file} on {link}")
else:
request.app.state.log.info(f"{file} already shared or failure!")
app.state.log(f"{file} has already been shared!")
except Exception:
return {}