mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-09 10:18:50 +01:00
🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837
This commit is contained in:
parent
9531bdd01c
commit
e2a6780cec
14 changed files with 155 additions and 16 deletions
|
|
@ -40,6 +40,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/system/setAccessAuthCode", model.CheckAuth, setAccessAuthCode)
|
||||
ginServer.Handle("POST", "/api/system/setNetworkServe", model.CheckAuth, setNetworkServe)
|
||||
ginServer.Handle("POST", "/api/system/setUploadErrLog", model.CheckAuth, setUploadErrLog)
|
||||
ginServer.Handle("POST", "/api/system/setDownloadInstallPkg", model.CheckAuth, setDownloadInstallPkg)
|
||||
ginServer.Handle("POST", "/api/system/setNetworkProxy", model.CheckAuth, setNetworkProxy)
|
||||
ginServer.Handle("POST", "/api/system/setWorkspaceDir", model.CheckAuth, setWorkspaceDir)
|
||||
ginServer.Handle("POST", "/api/system/listWorkspaceDirs", model.CheckAuth, listWorkspaceDirs)
|
||||
|
|
|
|||
|
|
@ -291,6 +291,20 @@ func setUploadErrLog(c *gin.Context) {
|
|||
time.Sleep(time.Second * 3)
|
||||
}
|
||||
|
||||
func setDownloadInstallPkg(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
downloadInstallPkg := arg["downloadInstallPkg"].(bool)
|
||||
model.Conf.System.DownloadInstallPkg = downloadInstallPkg
|
||||
model.Conf.Save()
|
||||
}
|
||||
|
||||
func setNetworkProxy(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue