#17 add dockerfile for api

This commit is contained in:
2024-07-28 15:07:19 +02:00
parent 1136133c5a
commit 85c684def7
12 changed files with 34 additions and 30 deletions

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)
}