Logs added

This commit is contained in:
Данил 2022-09-25 11:04:32 +03:00
parent d84a153f7d
commit 35adbe07ff
6 changed files with 126 additions and 59 deletions

View file

@ -2,6 +2,7 @@ package utils
import (
"encoding/json"
"github.com/Redume/EveryNasa/functions"
"net/http"
)
@ -13,6 +14,6 @@ func Respond(w http.ResponseWriter, data map[string]interface{}) {
w.Header().Add("Content-Type", "application/json")
err := json.NewEncoder(w).Encode(data)
if err != nil {
panic(err)
functions.Logger(err.Error())
}
}