Initial commit

This commit is contained in:
2024-07-25 17:23:46 +02:00
commit 59eb295c2c
28 changed files with 3870 additions and 0 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)
}