mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update default storage back to database
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user