diff --git a/lib/api/runners.rb b/lib/api/runners.rb index 4faba9dc87ba635a93c30707dd523bb7abc63eb2..be92355d9a6c69dedf8536e7efd0f93a30bb66ff 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -96,7 +96,7 @@ module API runner = get_runner(params[:runner_id]) authenticate_enable_runner!(runner) - Ci::RunnerProject.create(runner: runner, project: user_project) + runner.assign_to(user_project) present runner, with: Entities::Runner end