Update file share link URLs to remove 'public' segment for consistency

This commit is contained in:
Leon Bösche
2026-01-25 00:02:59 +01:00
parent 119e8e0736
commit a321104b4c

View File

@@ -2768,7 +2768,7 @@ func getFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *databas
if host == "" {
host = "go.b0esche.cloud"
}
fullURL := fmt.Sprintf("%s://%s/public/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{
@@ -2836,7 +2836,7 @@ func createFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *data
if host == "" {
host = "go.b0esche.cloud"
}
fullURL := fmt.Sprintf("%s://%s/public/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{
@@ -3105,7 +3105,7 @@ func getUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *dat
if host == "" {
host = "go.b0esche.cloud"
}
fullURL := fmt.Sprintf("%s://%s/public/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{
@@ -3170,7 +3170,7 @@ func createUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *
if host == "" {
host = "go.b0esche.cloud"
}
fullURL := fmt.Sprintf("%s://%s/public/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{