修复了初始化过程中添加推送方式失败的问题

This commit is contained in:
huoxue1 2023-02-18 16:10:59 +08:00
parent a2c6c477f1
commit 35be204775
2 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ var (
"/api/user/login", "/api/user/login",
"/api/user/init", "/api/user/init",
"api/public/panel/log", "api/public/panel/log",
"/api/user/notification/init",
} }
) )

View File

@ -29,6 +29,7 @@ func putNotification() gin.HandlerFunc {
ctx.JSON(403, res.Err(403, err)) ctx.JSON(403, res.Err(403, err))
return return
} }
_ = os.MkdirAll(path.Join("data", "config"), 0666)
err = notification.HandlePush(string(data)) err = notification.HandlePush(string(data))
if err != nil { if err != nil {
ctx.JSON(503, res.Err(503, err)) ctx.JSON(503, res.Err(503, err))