summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-29 14:36:29 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-29 14:36:29 +0200
commitba2ff8b5c571160c27dc25420cf4e948acf7ff99 (patch)
tree16ce70a541fa7783da183570d8f5faeb0816fa7f /lib/api
parenta1626a91ee07ff6cafd624eb62a7bf3b24d03411 (diff)
downloadgitlab-ci-ba2ff8b5c571160c27dc25420cf4e948acf7ff99.tar.gz
CreateBuildService for build creation and more validation to build model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/builds.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb
index 0982d7d..45b2d35 100644
--- a/lib/api/builds.rb
+++ b/lib/api/builds.rb
@@ -80,7 +80,7 @@ module API
required_attributes! [:project_id, :data, :project_token]
project = Project.find(params[:project_id])
authenticate_project_token!(project)
- build = project.register_build(params[:data])
+ build = CreateBuildService.new.execute(project, params[:data])
if build.persisted?
present build, with: Entities::Build