Skip to content

Commit e131cbe

Browse files
authored
Merge pull request #5 from wangrenjun/master
Fixed misspelling of location
2 parents 466abd6 + 4d40a3f commit e131cbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/controllers/posts_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (server *Server) CreatePost(w http.ResponseWriter, r *http.Request) {
4949
responses.ERROR(w, http.StatusInternalServerError, formattedError)
5050
return
5151
}
52-
w.Header().Set("Lacation", fmt.Sprintf("%s%s/%d", r.Host, r.URL.Path, postCreated.ID))
52+
w.Header().Set("Location", fmt.Sprintf("%s%s/%d", r.Host, r.URL.Path, postCreated.ID))
5353
responses.JSON(w, http.StatusCreated, postCreated)
5454
}
5555

0 commit comments

Comments
 (0)