Chore: standardize API returns

This commit is contained in:
Dreamacro
2018-12-10 11:33:37 +08:00
parent fa9077969c
commit 5e4b35e03a
4 changed files with 35 additions and 36 deletions

View File

@ -33,8 +33,7 @@ func getRules(w http.ResponseWriter, r *http.Request) {
})
}
w.WriteHeader(http.StatusOK)
render.Respond(w, r, map[string][]Rule{
render.JSON(w, r, map[string][]Rule{
"rules": rules,
})
}