diff --git a/api/utils/utils.go b/api/utils/utils.go index 5f51065..c903b44 100644 --- a/api/utils/utils.go +++ b/api/utils/utils.go @@ -11,5 +11,8 @@ func Message(status bool, message string) map[string]interface{} { func Respond(w http.ResponseWriter, data map[string]interface{}) { w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) + err := json.NewEncoder(w).Encode(data) + if err != nil { + panic(err) + } }