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