mirror of
https://github.com/gin-gonic/gin.git
synced 2025-06-17 00:06:34 +08:00
Merge branch 'master' of https://github.com/ngerakines/gin into ngerakines-master
It adds MustGet() method in context. Conflicts: examples/example_basic.go
This commit is contained in:
@ -38,7 +38,7 @@ func main() {
|
||||
}))
|
||||
|
||||
authorized.POST("admin", func(c *gin.Context) {
|
||||
user := c.Get(gin.AuthUserKey).(string)
|
||||
user := c.MustGet(gin.AuthUserKey).(string)
|
||||
|
||||
// Parse JSON
|
||||
var json struct {
|
||||
|
Reference in New Issue
Block a user