chore: update default storage back to database

This commit is contained in:
Steven
2023-10-05 13:36:33 +08:00
parent 077bf95425
commit 34ae9b0687
7 changed files with 23 additions and 12 deletions

View File

@ -13,10 +13,11 @@ import (
const (
// LocalStorage means the storage service is local file system.
// Default storage service is local file system.
LocalStorage int32 = -1
// DatabaseStorage means the storage service is database.
DatabaseStorage int32 = 0
// Default storage service is database.
DefaultStorage int32 = DatabaseStorage
)
type StorageType string
@ -212,7 +213,7 @@ func (s *APIV1Service) DeleteStorage(c echo.Context) error {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find storage").SetInternal(err)
}
if systemSetting != nil {
storageServiceID := LocalStorage
storageServiceID := DefaultStorage
err = json.Unmarshal([]byte(systemSetting.Value), &storageServiceID)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to unmarshal storage service id").SetInternal(err)