Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
1a8310f0
Unverified
Commit
1a8310f0
authored
May 15, 2023
by
boojack
Committed by
GitHub
May 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update system setting default value (#1665)
parent
041be467
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
15 deletions
+3
-15
resource.go
server/resource.go
+1
-1
system.go
server/system.go
+2
-2
05__default_local_storage_path.sql
...db/migration/prod/0.12/05__default_local_storage_path.sql
+0
-7
10005__system_setting.sql
store/db/seed/10005__system_setting.sql
+0
-5
10005__tag.sql
store/db/seed/10005__tag.sql
+0
-0
No files found.
server/resource.go
View file @
1a8310f0
...
...
@@ -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
{
...
...
server/system.go
View file @
1a8310f0
...
...
@@ -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
{})
...
...
store/db/migration/prod/0.12/05__default_local_storage_path.sql
deleted
100644 → 0
View file @
041be467
INSERT
OR
IGNORE
INTO
system_setting
(
name
,
value
)
VALUES
(
'local-storage-path'
,
'"assets/{timestamp}_{filename}"'
);
\ No newline at end of file
store/db/seed/10005__system_setting.sql
deleted
100644 → 0
View file @
041be467
INSERT
INTO
system_setting
(
`name`
,
`value`
,
`description`
)
VALUES
(
'allow-signup'
,
'true'
,
''
),
(
'max-upload-size-mib'
,
'32'
,
''
);
\ No newline at end of file
store/db/seed/1000
6
__tag.sql
→
store/db/seed/1000
5
__tag.sql
View file @
1a8310f0
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment