mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(indexers): toggle state (#1214)
* fix(indexers): toggle state * fix(indexers): toggle state --------- Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
parent
cb036ac538
commit
8a8069408a
3 changed files with 3 additions and 2 deletions
|
@ -41,7 +41,7 @@ type IndexerDefinition struct {
|
|||
Identifier string `json:"identifier"`
|
||||
Implementation string `json:"implementation"`
|
||||
BaseURL string `json:"base_url,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Description string `json:"description"`
|
||||
Language string `json:"language"`
|
||||
Privacy string `json:"privacy"`
|
||||
|
|
|
@ -702,6 +702,8 @@ func (s *service) ToggleEnabled(ctx context.Context, indexerID int, enabled bool
|
|||
return err
|
||||
}
|
||||
|
||||
indexer.Enabled = enabled
|
||||
|
||||
// update indexerInstances
|
||||
if err := s.updateIndexer(*indexer); err != nil {
|
||||
s.log.Error().Err(err).Msgf("failed to add indexer: %s", indexer.Name)
|
||||
|
|
|
@ -129,7 +129,6 @@ const ListItem = ({ indexer }: ListItemProps) => {
|
|||
});
|
||||
|
||||
const onToggleMutation = (newState: boolean) => {
|
||||
// backend is rejecting when ending the whole object
|
||||
updateMutation.mutate(newState);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue