Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2019-04-24 16:40:28 +08:00
committed by zryfish
parent 68809bcc38
commit 955d20fec0
8 changed files with 18 additions and 10 deletions

View File

@@ -262,6 +262,7 @@ func CreateDevopsProject(req *restful.Request, resp *restful.Response) {
err := req.ReadEntity(&devops)
if err != nil {
glog.Infof("%+v", err)
resp.WriteHeaderAndEntity(http.StatusBadRequest, errors.Wrap(err))
return
}
@@ -270,6 +271,7 @@ func CreateDevopsProject(req *restful.Request, resp *restful.Response) {
project, err, code := tenant.CreateDevopsProject(username, workspaceName, &devops)
if err != nil {
glog.Errorf("%+v", err)
resp.WriteHeaderAndEntity(code, errors.Wrap(err))
return
}