mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-09 00:34:20 +01:00
This commit is contained in:
parent
1715b150a2
commit
9de0fe0d93
11 changed files with 1 additions and 53 deletions
|
|
@ -39,7 +39,6 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/system/getEmojiConf", model.CheckAuth, getEmojiConf)
|
||||
ginServer.Handle("POST", "/api/system/setAccessAuthCode", model.CheckAuth, setAccessAuthCode)
|
||||
ginServer.Handle("POST", "/api/system/setNetworkServe", model.CheckAuth, setNetworkServe)
|
||||
ginServer.Handle("POST", "/api/system/setFixedPort", model.CheckAuth, setFixedPort)
|
||||
ginServer.Handle("POST", "/api/system/setUploadErrLog", model.CheckAuth, setUploadErrLog)
|
||||
ginServer.Handle("POST", "/api/system/setGoogleAnalytics", model.CheckAuth, setGoogleAnalytics)
|
||||
ginServer.Handle("POST", "/api/system/setDownloadInstallPkg", model.CheckAuth, setDownloadInstallPkg)
|
||||
|
|
|
|||
|
|
@ -285,23 +285,6 @@ func setNetworkServe(c *gin.Context) {
|
|||
time.Sleep(time.Second * 3)
|
||||
}
|
||||
|
||||
func setFixedPort(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
fixedPort := arg["fixedPort"].(bool)
|
||||
model.Conf.System.FixedPort = fixedPort
|
||||
model.Conf.Save()
|
||||
|
||||
util.PushMsg(model.Conf.Language(42), 1000*15)
|
||||
time.Sleep(time.Second * 3)
|
||||
}
|
||||
|
||||
func setGoogleAnalytics(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ type System struct {
|
|||
DataDir string `json:"dataDir"`
|
||||
|
||||
NetworkServe bool `json:"networkServe"` // 是否开启网络伺服
|
||||
FixedPort bool `json:"fixedPort"` // 是否使用固定端口 6806
|
||||
NetworkProxy *NetworkProxy `json:"networkProxy"`
|
||||
|
||||
UploadErrLog bool `json:"uploadErrLog"`
|
||||
|
|
|
|||
|
|
@ -296,13 +296,6 @@ func InitConf() {
|
|||
Conf.AccessAuthCode = util.AccessAuthCode
|
||||
}
|
||||
|
||||
if util.ContainerStd != util.Container {
|
||||
Conf.System.FixedPort = true
|
||||
}
|
||||
if Conf.System.FixedPort {
|
||||
util.ServerPort = util.FixedPort
|
||||
}
|
||||
|
||||
Conf.LocalIPs = util.GetLocalIPs()
|
||||
|
||||
Conf.Save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue