This commit is contained in:
Liang Ding 2022-12-20 19:50:10 +08:00
parent 1715b150a2
commit 9de0fe0d93
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
11 changed files with 1 additions and 53 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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"`

View file

@ -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()