Config for stash-box instances (#748)

This commit is contained in:
InfiniteTF
2020-09-14 09:13:35 +02:00
committed by GitHub
parent b527a8d137
commit 03f5e1a442
8 changed files with 215 additions and 0 deletions

View File

@@ -130,6 +130,13 @@ func (r *mutationResolver) ConfigureGeneral(ctx context.Context, input models.Co
refreshScraperCache = true
}
if input.StashBoxes != nil {
if err := config.ValidateStashBoxes(input.StashBoxes); err != nil {
return nil, err
}
config.Set(config.StashBoxes, input.StashBoxes)
}
if err := config.Write(); err != nil {
return makeConfigGeneralResult(), err
}