mirror of
https://github.com/luckjiawei/podux.git
synced 2026-12-02 17:26:50 +00:00
🔒️ fix security
This commit is contained in:
1 parent
e2497cf4e0
commit
090cc1c68a
21 files changed
+315
-101
No files matched your search
@@ -19,11 +19,11 @@ func NewGithubHandler(app core.App, service *github.Service) *GithubHandler {
|
||||
}
|
||||
|
||||
func (h *GithubHandler) RegisterHandlers(e *core.ServeEvent) {
|
||||
e.Router.GET("/api/github/frp/releases", func(e *core.RequestEvent) error {
|
||||
e.Router.GET("/api/github/frp/releases", requireAuth(func(e *core.RequestEvent) error {
|
||||
releases, err := h.service.GetFrpReleases()
|
||||
if err != nil {
|
||||
return e.JSON(500, map[string]string{"error": err.Error()})
|
||||
}
|
||||
return e.JSON(200, releases)
|
||||
})
|
||||
}))
|
||||
}
|
||||
Reference in new issue
Block a user