Merge branch 'bindings' into develop

This commit is contained in:
Manu Mtz-Almeida
2014-07-05 02:49:25 +02:00
5 changed files with 249 additions and 59 deletions

View File

@ -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"})
}