fixes content-type for post and put on actions
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
This commit is contained in:
parent
7e7558dd5e
commit
c0175fc9bc
@ -117,8 +117,8 @@ func postActionFunc(m *models.Model) http.HandlerFunc {
|
||||
CreatedAction: action,
|
||||
ID: int64(id),
|
||||
}
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
if err := json.NewEncoder(w).Encode(response); err != nil {
|
||||
serverError(w, err)
|
||||
}
|
||||
@ -176,8 +176,8 @@ func putActionFunc(m *models.Model) http.HandlerFunc {
|
||||
UpdatedAction: action,
|
||||
ID: int64(id),
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
if err := json.NewEncoder(w).Encode(response); err != nil {
|
||||
serverError(w, err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user