mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(filters): add support for multiple external filters (#1030)
* feat(filters): add support for multiple ext filters * refactor(filters): crud and check * feat(filters): add postgres migrations * fix(filters): field array types * fix(filters): formatting * fix(filters): formatting * feat(filters): external webhook improve logs
This commit is contained in:
parent
db209319da
commit
dde0d0ed61
15 changed files with 1514 additions and 478 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/go-chi/chi/v5"
|
||||
|
||||
"github.com/autobrr/autobrr/internal/domain"
|
||||
"github.com/autobrr/autobrr/pkg/errors"
|
||||
)
|
||||
|
||||
type filterService interface {
|
||||
|
@ -117,7 +118,12 @@ func (h filterHandler) getByID(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
filter, err := h.service.FindByID(ctx, id)
|
||||
if err != nil {
|
||||
h.encoder.StatusNotFound(w)
|
||||
if errors.Is(err, domain.ErrRecordNotFound) {
|
||||
h.encoder.StatusNotFound(w)
|
||||
return
|
||||
}
|
||||
|
||||
h.encoder.StatusInternalError(w)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue