Return account id when to issue a robot

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-05-22 10:38:57 +08:00
parent 1ceb7a2fb9
commit 056cfc7e31
2 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,7 @@ func (rq *RobotReq) Valid(v *validation.Validation) {
// RobotRep ...
type RobotRep struct {
ID int64 `json:"id"`
Name string `json:"name"`
Token string `json:"token"`
}

View File

@ -158,6 +158,7 @@ func (r *RobotAPI) Post() {
}
robotRep := models.RobotRep{
ID: id,
Name: robot.Name,
Token: rawTk,
}