mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update system setting default value (#1665)
This commit is contained in:
@@ -137,7 +137,7 @@ func (s *Server) registerResourceRoutes(g *echo.Group) {
|
|||||||
if err != nil && common.ErrorCode(err) != common.NotFound {
|
if err != nil && common.ErrorCode(err) != common.NotFound {
|
||||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find local storage path setting").SetInternal(err)
|
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find local storage path setting").SetInternal(err)
|
||||||
}
|
}
|
||||||
localStoragePath := ""
|
localStoragePath := "assets/{timestamp}_{filename}"
|
||||||
if systemSettingLocalStoragePath != nil {
|
if systemSettingLocalStoragePath != nil {
|
||||||
err = json.Unmarshal([]byte(systemSettingLocalStoragePath.Value), &localStoragePath)
|
err = json.Unmarshal([]byte(systemSettingLocalStoragePath.Value), &localStoragePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -44,7 +44,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
|||||||
AllowSignUp: false,
|
AllowSignUp: false,
|
||||||
IgnoreUpgrade: false,
|
IgnoreUpgrade: false,
|
||||||
DisablePublicMemos: false,
|
DisablePublicMemos: false,
|
||||||
MaxUploadSizeMiB: 32, // this is the frontend default value
|
MaxUploadSizeMiB: 32,
|
||||||
AdditionalStyle: "",
|
AdditionalStyle: "",
|
||||||
AdditionalScript: "",
|
AdditionalScript: "",
|
||||||
CustomizedProfile: api.CustomizedProfile{
|
CustomizedProfile: api.CustomizedProfile{
|
||||||
@@ -56,7 +56,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
|||||||
ExternalURL: "",
|
ExternalURL: "",
|
||||||
},
|
},
|
||||||
StorageServiceID: api.DatabaseStorage,
|
StorageServiceID: api.DatabaseStorage,
|
||||||
LocalStoragePath: "",
|
LocalStoragePath: "assets/{timestamp}_{filename}",
|
||||||
}
|
}
|
||||||
|
|
||||||
systemSettingList, err := s.Store.FindSystemSettingList(ctx, &api.SystemSettingFind{})
|
systemSettingList, err := s.Store.FindSystemSettingList(ctx, &api.SystemSettingFind{})
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
INSERT
|
|
||||||
OR IGNORE INTO system_setting(name, value)
|
|
||||||
VALUES
|
|
||||||
(
|
|
||||||
'local-storage-path',
|
|
||||||
'"assets/{timestamp}_{filename}"'
|
|
||||||
);
|
|
@@ -1,5 +0,0 @@
|
|||||||
INSERT INTO
|
|
||||||
system_setting (`name`, `value`, `description`)
|
|
||||||
VALUES
|
|
||||||
('allow-signup', 'true', ''),
|
|
||||||
('max-upload-size-mib', '32', '');
|
|
Reference in New Issue
Block a user