mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-19 01:54:06 +00:00
feat: redirect to login page if login expired (close #18)
This commit is contained in:
@@ -16,7 +16,7 @@ func authHelper(c *gin.Context, minRole int) {
|
||||
id := session.Get("id")
|
||||
status := session.Get("status")
|
||||
if username == nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
c.JSON(http.StatusUnauthorized, gin.H{
|
||||
"success": false,
|
||||
"message": "无权进行此操作,未登录",
|
||||
})
|
||||
|
Reference in New Issue
Block a user