This commit is contained in:
lbenedar
2026-02-27 12:37:47 +03:00
parent 6876c4a55f
commit 41bf28c77d

View File

@@ -18,6 +18,11 @@ func snippetView(w http.ResponseWriter, r *http.Request) {
}
func snippetCreate(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
w.Header().Set("Allow", http.MethodPost)
http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed)
return
}
w.Write([]byte("Create a new snippet"))
}