mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
💥 v2.0 必须更新面板,新增服务监控
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/naiba/nezha/service/dao"
|
||||
)
|
||||
|
||||
// AuthorizeOption ..
|
||||
type AuthorizeOption struct {
|
||||
Guest bool
|
||||
Member bool
|
||||
@@ -21,7 +20,6 @@ type AuthorizeOption struct {
|
||||
Btn string
|
||||
}
|
||||
|
||||
// Authorize ..
|
||||
func Authorize(opt AuthorizeOption) func(*gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
token, err := c.Cookie(dao.Conf.Site.CookieName)
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/naiba/nezha/model"
|
||||
)
|
||||
|
||||
// ErrInfo ..
|
||||
type ErrInfo struct {
|
||||
Code uint64
|
||||
Title string
|
||||
@@ -17,7 +16,6 @@ type ErrInfo struct {
|
||||
Btn string
|
||||
}
|
||||
|
||||
// ShowErrorPage ..
|
||||
func ShowErrorPage(c *gin.Context, i ErrInfo, isPage bool) {
|
||||
if isPage {
|
||||
c.HTML(http.StatusOK, "dashboard/error", CommonEnvironment(c, gin.H{
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
"github.com/naiba/nezha/service/dao"
|
||||
)
|
||||
|
||||
// CommonEnvironment ..
|
||||
func CommonEnvironment(c *gin.Context, data map[string]interface{}) gin.H {
|
||||
data["MatchedPath"] = c.MustGet("MatchedPath")
|
||||
data["Version"] = dao.Version
|
||||
@@ -27,7 +26,6 @@ func CommonEnvironment(c *gin.Context, data map[string]interface{}) gin.H {
|
||||
return data
|
||||
}
|
||||
|
||||
// RecordPath ..
|
||||
func RecordPath(c *gin.Context) {
|
||||
url := c.Request.URL.String()
|
||||
for _, p := range c.Params {
|
||||
|
||||
Reference in New Issue
Block a user