diff --git a/api/midware.go b/api/midware.go index f1cc69c..e2fb2a2 100644 --- a/api/midware.go +++ b/api/midware.go @@ -20,6 +20,7 @@ var ( "/api/user/login", "/api/user/init", "api/public/panel/log", + "/api/user/notification/init", } ) diff --git a/api/user/notification.go b/api/user/notification.go index dbb36de..9217f18 100644 --- a/api/user/notification.go +++ b/api/user/notification.go @@ -29,6 +29,7 @@ func putNotification() gin.HandlerFunc { ctx.JSON(403, res.Err(403, err)) return } + _ = os.MkdirAll(path.Join("data", "config"), 0666) err = notification.HandlePush(string(data)) if err != nil { ctx.JSON(503, res.Err(503, err))