cleanups and code fixes incl templ
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -19,6 +19,11 @@ import (
|
||||
// @Failure 500 {object} models.ErrorResponse "Server error"
|
||||
// @Router /api/snapshots/hourly/force [post]
|
||||
func (h *Handler) SnapshotForceHourly(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
writeJSONError(w, http.StatusMethodNotAllowed, "method not allowed")
|
||||
return
|
||||
}
|
||||
|
||||
confirm := strings.TrimSpace(r.URL.Query().Get("confirm"))
|
||||
if strings.ToUpper(confirm) != "FORCE" {
|
||||
writeJSONError(w, http.StatusBadRequest, "confirm must be 'FORCE'")
|
||||
|
||||
Reference in New Issue
Block a user