mirror of
https://gitee.com/gokins/gokins.git
synced 2024-12-04 20:27:36 +08:00
14 lines
212 B
Go
14 lines
212 B
Go
package utilService
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
func MidNeedLogin(c *gin.Context) {
|
|
lgusr := CurrUser(c)
|
|
if lgusr == nil {
|
|
c.String(403, "not login")
|
|
c.Abort()
|
|
return
|
|
}
|
|
c.Set("lguser", lgusr)
|
|
}
|