diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-29 14:36:29 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-29 14:36:29 +0200 |
commit | ba2ff8b5c571160c27dc25420cf4e948acf7ff99 (patch) | |
tree | 16ce70a541fa7783da183570d8f5faeb0816fa7f /lib | |
parent | a1626a91ee07ff6cafd624eb62a7bf3b24d03411 (diff) | |
download | gitlab-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')
-rw-r--r-- | lib/api/builds.rb | 2 |
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 |