mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
add token,secret when creating user
This commit is contained in:
parent
9298f16155
commit
89c95f4f00
1 changed files with 2 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue