Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 6d6579b

Browse files
committed
api: Fix a 'http: superfluous response.WriteHeader' message
1 parent de69b36 commit 6d6579b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

api/handlers.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,10 +1400,8 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
14001400
jsonErr(w, err.Error(), http.StatusInternalServerError)
14011401
return
14021402
}
1403+
w.WriteHeader(http.StatusCreated) // Signal the successful database creation
14031404
fmt.Fprintf(w, string(jsonData))
1404-
1405-
// Signal the successful database creation
1406-
http.Error(w, "", http.StatusCreated)
14071405
}
14081406

14091407
// viewsHandler returns the list of views in a SQLite database

0 commit comments

Comments
 (0)