mirror of
https://github.com/usememos/memos.git
synced 2024-12-26 23:22:47 +08:00
chore: update system setting default value (#1665)
This commit is contained in:
parent
041be46732
commit
1a8310f027
5 changed files with 3 additions and 15 deletions
|
@ -137,7 +137,7 @@ func (s *Server) registerResourceRoutes(g *echo.Group) {
|
|||
if err != nil && common.ErrorCode(err) != common.NotFound {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find local storage path setting").SetInternal(err)
|
||||
}
|
||||
localStoragePath := ""
|
||||
localStoragePath := "assets/{timestamp}_{filename}"
|
||||
if systemSettingLocalStoragePath != nil {
|
||||
err = json.Unmarshal([]byte(systemSettingLocalStoragePath.Value), &localStoragePath)
|
||||
if err != nil {
|
||||
|
|
|
@ -44,7 +44,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
|||
AllowSignUp: false,
|
||||
IgnoreUpgrade: false,
|
||||
DisablePublicMemos: false,
|
||||
MaxUploadSizeMiB: 32, // this is the frontend default value
|
||||
MaxUploadSizeMiB: 32,
|
||||
AdditionalStyle: "",
|
||||
AdditionalScript: "",
|
||||
CustomizedProfile: api.CustomizedProfile{
|
||||
|
@ -56,7 +56,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
|||
ExternalURL: "",
|
||||
},
|
||||
StorageServiceID: api.DatabaseStorage,
|
||||
LocalStoragePath: "",
|
||||
LocalStoragePath: "assets/{timestamp}_{filename}",
|
||||
}
|
||||
|
||||
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', '');
|
Loading…
Reference in a new issue