diff --git a/env-sample b/env-sample index 9f69854..f12a847 100644 --- a/env-sample +++ b/env-sample @@ -3,3 +3,4 @@ BASE_URL=https://wrap.sh SERVER_PORT=8080 UPLOAD_DIR=uploads TOP_N_COMMANDS=10 +MASTODON_INSTANCE_FOR_SHARING=mastodon.social diff --git a/internal/web/controller.go b/internal/web/controller.go index db11a12..0145096 100644 --- a/internal/web/controller.go +++ b/internal/web/controller.go @@ -121,6 +121,9 @@ func handleResults(w http.ResponseWriter, r *http.Request) { } stats["baseURL"] = baseURL + mastodon := os.Getenv("MASTODON_INSTANCE_FOR_SHARING") + stats["mastodon"] = mastodon + tmpl, err := loadTemplates("result.html") if err != nil { http.Error(w, "Error loading template", http.StatusInternalServerError) diff --git a/internal/web/templates/result.html b/internal/web/templates/result.html index 221201f..e0505d5 100644 --- a/internal/web/templates/result.html +++ b/internal/web/templates/result.html @@ -54,17 +54,17 @@