Fix linting error
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Torjus Håkestad 2022-01-24 20:32:49 +01:00
parent 030806b0c4
commit f78c68d46c
3 changed files with 4 additions and 4 deletions

View File

@ -28,6 +28,7 @@ linters:
- stylecheck
- exportloopref
- godot
linters-settings:
gomnd:
ignored-functions:

View File

@ -11,9 +11,9 @@ pipeline:
event: [push, pull_request, tag, deployment]
lint:
image: golangci/golangci-lint:latest
image: golangci/golangci-lint:v1.43.0
commands:
- golangci-lint run -v
- golangci-lint run
when:
event: [push, pull_request]

View File

@ -139,8 +139,7 @@ func (s *HTTPServer) HandlerAPIFileDelete(w http.ResponseWriter, r *http.Request
return
}
err := s.Files.Delete(id)
if err != nil {
if err := s.Files.Delete(id); err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}