writeJson -> writeJSON

pull/94/head
Aloïs Micard 3 years ago
parent c114e091f9
commit fcca98f99f
No known key found for this signature in database
GPG Key ID: 1A0EB82F071F5EFE

@ -140,7 +140,7 @@ func (state *State) searchResources(w http.ResponseWriter, r *http.Request) {
writePagination(w, searchParams, totalCount)
// Write body
writeJson(w, resources)
writeJSON(w, resources)
}
func (state *State) addResource(w http.ResponseWriter, r *http.Request) {
@ -202,7 +202,7 @@ func (state *State) addResource(w http.ResponseWriter, r *http.Request) {
log.Info().Str("url", res.URL).Msg("Successfully saved resource")
writeJson(w, res)
writeJSON(w, res)
}
func (state *State) scheduleURL(w http.ResponseWriter, r *http.Request) {
@ -319,7 +319,7 @@ func getRawQueryParam(url string) map[string]string {
return val
}
func writeJson(w http.ResponseWriter, body interface{}) {
func writeJSON(w http.ResponseWriter, body interface{}) {
b, err := json.Marshal(body)
if err != nil {
log.Err(err).Msg("error while serializing body")

Loading…
Cancel
Save