Skip to content

Commit

Permalink
kindが見つからない場合に複数のレスポンスが買える問題を解決
Browse files Browse the repository at this point in the history
  • Loading branch information
studiokaiji committed Oct 22, 2023
1 parent 240d5de commit bb283c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hostr/cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ func Start(port string, mode string) {
contentType, err := tools.GetContentType(ev.Kind)
if err != nil {
ctx.String(http.StatusNotFound, http.StatusText(http.StatusNotFound))
} else {
ctx.Data(http.StatusOK, contentType, []byte(ev.Content))
}
ctx.Data(http.StatusOK, contentType, []byte(ev.Content))
} else {
ctx.String(http.StatusNotFound, http.StatusText(http.StatusNotFound))
}
Expand Down

0 comments on commit bb283c7

Please sign in to comment.