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
553e8d09
Commit
553e8d09
authored
Jul 24, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update public default value to false
parent
22ec0cf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
main.go
bin/memos/main.go
+4
-3
workspace_service.go
server/router/api/v1/workspace_service.go
+3
-0
No files found.
bin/memos/main.go
View file @
553e8d09
...
...
@@ -110,7 +110,7 @@ func init() {
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
data
,
"data"
,
"d"
,
""
,
"data directory"
)
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
driver
,
"driver"
,
""
,
""
,
"database driver"
)
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
dsn
,
"dsn"
,
""
,
""
,
"database source name(aka. DSN)"
)
rootCmd
.
PersistentFlags
()
.
BoolVarP
(
&
public
,
"public"
,
""
,
tru
e
,
""
)
rootCmd
.
PersistentFlags
()
.
BoolVarP
(
&
public
,
"public"
,
""
,
fals
e
,
""
)
err
:=
viper
.
BindPFlag
(
"mode"
,
rootCmd
.
PersistentFlags
()
.
Lookup
(
"mode"
))
if
err
!=
nil
{
...
...
@@ -145,7 +145,7 @@ func init() {
viper
.
SetDefault
(
"driver"
,
"sqlite"
)
viper
.
SetDefault
(
"addr"
,
""
)
viper
.
SetDefault
(
"port"
,
8081
)
viper
.
SetDefault
(
"public"
,
tru
e
)
viper
.
SetDefault
(
"public"
,
fals
e
)
viper
.
SetEnvPrefix
(
"memos"
)
}
...
...
@@ -166,9 +166,10 @@ dsn: %s
addr: %s
port: %d
mode: %s
public: %t
driver: %s
---
`
,
instanceProfile
.
Version
,
instanceProfile
.
Data
,
instanceProfile
.
DSN
,
instanceProfile
.
Addr
,
instanceProfile
.
Port
,
instanceProfile
.
Mode
,
instanceProfile
.
Driver
)
`
,
instanceProfile
.
Version
,
instanceProfile
.
Data
,
instanceProfile
.
DSN
,
instanceProfile
.
Addr
,
instanceProfile
.
Port
,
instanceProfile
.
Mode
,
instanceProfile
.
Public
,
instanceProfile
.
Driver
)
}
func
printGreetings
()
{
...
...
server/router/api/v1/workspace_service.go
View file @
553e8d09
...
...
@@ -23,6 +23,9 @@ func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorks
}
if
owner
!=
nil
{
workspaceProfile
.
Owner
=
owner
.
Name
}
else
{
// If owner is not found, set public to true.
workspaceProfile
.
Public
=
true
}
return
workspaceProfile
,
nil
}
...
...
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