Some work around bindings. it may do not compile
This commit is contained in:
@ -44,7 +44,8 @@ func main() {
|
||||
var json struct {
|
||||
Value string `json:"value" binding:"required"`
|
||||
}
|
||||
if c.EnsureBody(&json) {
|
||||
|
||||
if c.Bind(&json) {
|
||||
DB[user] = json.Value
|
||||
c.JSON(200, gin.H{"status": "ok"})
|
||||
}
|
||||
|
Reference in New Issue
Block a user