mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-23 22:04:06 +08:00
fix(storage): explicitly set storages' status to disabled (#3810)
This commit is contained in:
parent
6aaec19c1c
commit
666e02f0c3
@ -2,5 +2,6 @@ package op
|
||||
|
||||
const (
|
||||
WORK = "work"
|
||||
DISABLED = "disabled"
|
||||
RootName = "root"
|
||||
)
|
||||
|
@ -142,6 +142,7 @@ func DisableStorage(ctx context.Context, id uint) error {
|
||||
}
|
||||
// delete the storage in the memory
|
||||
storage.Disabled = true
|
||||
storage.SetStatus(DISABLED)
|
||||
err = db.UpdateStorage(storage)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "failed update storage in db")
|
||||
|
Loading…
x
Reference in New Issue
Block a user