Lint fixes and testing workflow actions
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
// Accounts returns the list of all configured WhatsApp accounts
|
||||
func (h *Handlers) Accounts(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(h.config.WhatsApp)
|
||||
writeJSON(w, h.config.WhatsApp)
|
||||
}
|
||||
|
||||
// AddAccount adds a new WhatsApp account to the system
|
||||
@@ -43,5 +43,5 @@ func (h *Handlers) AddAccount(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
json.NewEncoder(w).Encode(map[string]string{"status": "ok"})
|
||||
writeJSON(w, map[string]string{"status": "ok"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user