fix: return if method is not correct
This commit is contained in:
parent
e1a9246b1a
commit
992239ff1f
1
main.go
1
main.go
@ -44,6 +44,7 @@ func handleRoot(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
if r.Method != "GET" {
|
if r.Method != "GET" {
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
var Type ResponseType
|
var Type ResponseType
|
||||||
Type = ResponseType(r.URL.Query().Get("t"))
|
Type = ResponseType(r.URL.Query().Get("t"))
|
||||||
|
Loading…
Reference in New Issue
Block a user