🎨 Support one-click addition of Microsoft Defender exclusions https://github.com/siyuan-note/siyuan/issues/13650

This commit is contained in:
Daniel 2024-12-29 09:54:18 +08:00
parent 6145ffe821
commit 2784511e72
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 74 additions and 3 deletions

View file

@ -35,6 +35,21 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func addMicrosoftDefenderExclusion(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
if !gulu.OS.IsWindows() {
return
}
err := model.AddMicrosoftDefenderExclusion()
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
}
}
func reloadUI(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)