Skip to content

Commit

Permalink
fix: method not allowed response
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Apr 21, 2023
1 parent da94d0b commit fe81afd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func main() {
}

func startServer(serverName string, port string, mux *http.ServeMux) {
log.Printf("Stating %s %q", serverName, port)
log.Printf("Starting %s %q", serverName, port)
if err := http.ListenAndServe(port, mux); err != nil {
log.Fatalf("Cannot start %s: %s", serverName, err)
}
Expand Down Expand Up @@ -253,6 +253,7 @@ type saveBackupSummaryHandler struct {
func (s *saveBackupSummaryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
http.Error(w, "Method Not Allowed", 405)
return
}
var summary backupSummary

Expand Down

0 comments on commit fe81afd

Please sign in to comment.