test-errcode
withchao 2 years ago
parent 20aea0c335
commit 631c7202b4

@ -102,9 +102,11 @@ func main() {
userID, err := token_verify.ParseUserIDFromToken(c.GetHeader("token"), c.MustGet("operationID").(string)) userID, err := token_verify.ParseUserIDFromToken(c.GetHeader("token"), c.MustGet("operationID").(string))
if err != nil { if err != nil {
c.String(400, err.Error()) c.String(400, err.Error())
c.Abort()
return return
} }
c.Set("opUserID", userID) c.Set("opUserID", userID)
c.Next()
}) })
{ {
groupRouterGroup.POST("/create_group", group.NewCreateGroup) //1 groupRouterGroup.POST("/create_group", group.NewCreateGroup) //1

Loading…
Cancel
Save