Commit 5f887344 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Prefer Runner#assign_to instead of creating directly

parent 121c6322
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment