fix(indexes): toggle on and off with switch (#1164)

* chore(indexers): replace array position with id

* fix(indexers): enable and disable without editing

* feat(indexer): add toggle endpoint and refactoring

---------

Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
Fabricio Silva 2023-10-03 20:57:11 +01:00 committed by GitHub
parent 603191b47d
commit 8600d3a2ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 167 additions and 50 deletions

View file

@ -22,6 +22,7 @@ type IndexerRepo interface {
Delete(ctx context.Context, id int) error
FindByFilterID(ctx context.Context, id int) ([]Indexer, error)
FindByID(ctx context.Context, id int) (*Indexer, error)
ToggleEnabled(ctx context.Context, indexerID int, enabled bool) error
}
type Indexer struct {