#109 begin migration
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 4s

This commit is contained in:
Tim
2024-08-21 23:33:06 +02:00
parent 3f897e8521
commit 5166f216d7
31 changed files with 68 additions and 5813 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)
}