mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat: add postgres support (#215)
* feat: add postgres support and refactor * feat: improve releases find * fix: autobrrctl create user
This commit is contained in:
parent
f6873e932e
commit
3185832708
30 changed files with 1708 additions and 831 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
type actionService interface {
|
||||
Fetch() ([]domain.Action, error)
|
||||
List(ctx context.Context) ([]domain.Action, error)
|
||||
Store(ctx context.Context, action domain.Action) (*domain.Action, error)
|
||||
Delete(actionID int) error
|
||||
ToggleEnabled(actionID int) error
|
||||
|
@ -39,7 +39,7 @@ func (h actionHandler) Routes(r chi.Router) {
|
|||
}
|
||||
|
||||
func (h actionHandler) getActions(w http.ResponseWriter, r *http.Request) {
|
||||
actions, err := h.service.Fetch()
|
||||
actions, err := h.service.List(r.Context())
|
||||
if err != nil {
|
||||
// encode error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue