add token,secret when creating user

This commit is contained in:
Brad Rydzewski 2015-04-08 15:54:08 -07:00
parent 9298f16155
commit 89c95f4f00

View file

@ -33,6 +33,8 @@ func PostUser(c *gin.Context) {
ds := ToDatastore(c)
name := c.Params.ByName("name")
user := &common.User{Login: name, Name: name}
user.Token = c.Request.FormValue("token")
user.Secret = c.Request.FormValue("secret")
if err := ds.InsertUser(user); err != nil {
c.Fail(400, err)
} else {