#109 switch svelte to SSR with go
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 46s

This commit is contained in:
Tim
2024-08-21 23:33:06 +02:00
parent 69b8efc8b9
commit 9c7d7e2cb3
53 changed files with 1796 additions and 6353 deletions

11
utils/http-utils.go Normal file
View File

@@ -0,0 +1,11 @@
package utils
import (
"encoding/json"
"net/http"
)
func WriteJSON(w http.ResponseWriter, data interface{}) error {
w.Header().Set("Content-Type", "application/json")
return json.NewEncoder(w).Encode(data)
}