更新
This commit is contained in:
1 parent
5718a00e31
commit
1850ac640e
226 files changed
+37772
-12071
No files matched your search
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"server/pkg/jwtutil"
|
||||
"server/pkg/identity"
|
||||
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
@@ -21,7 +22,8 @@ import (
|
||||
func websiteAuth(c *beego.Controller) (*jwtutil.Claims, bool) {
|
||||
claims, err := requirePlatform(c)
|
||||
if err != nil {
|
||||
jsonErr(c, 401, 401, err.Error())
|
||||
code := identity.Status(err)
|
||||
jsonErr(c, code, code, err.Error())
|
||||
return nil, false
|
||||
}
|
||||
return claims, true
|
||||
|
||||
Reference in new issue
Block a user