mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-16 14:08:17 +00:00
19 lines
290 B
Go
19 lines
290 B
Go
package controller
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"x-ui/web/session"
|
|
)
|
|
|
|
type BaseController struct {
|
|
}
|
|
|
|
func (a *BaseController) before(c *gin.Context) {
|
|
if !session.IsLogin(c) {
|
|
pureJsonMsg(c, false, "登录时效已过,请重新登录")
|
|
c.Abort()
|
|
} else {
|
|
c.Next()
|
|
}
|
|
}
|