#73 setup password hashing with argin2id and update some infra
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 59s

This commit is contained in:
Tim
2024-08-10 00:14:38 +02:00
parent 2f1b4fc8a7
commit 0df0e7f6f9
15 changed files with 139 additions and 344 deletions

11
api/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)
}