mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-02 15:06:23 -07:00
Set Content-Type header to application/json when a post is submitted
This commit is contained in:
parent
1facbdcd48
commit
4264b8eeec
1 changed files with 1 additions and 0 deletions
|
@ -376,6 +376,7 @@ func MakePost(writer http.ResponseWriter, request *http.Request) {
|
|||
if !post.IsTopPost {
|
||||
topPost, _ = post.TopPostID()
|
||||
}
|
||||
writer.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(writer).Encode(map[string]interface{}{
|
||||
"time": post.CreatedOn,
|
||||
"id": post.ID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue