Commit 1a6a59d6 authored by Shinya Maeda's avatar Shinya Maeda Committed by Alessio Caiazza

Add unschedule endpont to job controller

parent 22e00b08
...@@ -110,6 +110,13 @@ class Projects::JobsController < Projects::ApplicationController ...@@ -110,6 +110,13 @@ class Projects::JobsController < Projects::ApplicationController
redirect_to build_path(@build) redirect_to build_path(@build)
end end
def unschedule
return respond_422 unless @build.scheduled?
redirect_to build_path(@build)
def status def status
render json: BuildSerializer render json: BuildSerializer
.new(project: @project, current_user: @current_user) .new(project: @project, current_user: @current_user)
...@@ -275,6 +275,7 @@ constraints( do ...@@ -275,6 +275,7 @@ constraints( do
member do member do
get :status get :status
post :cancel post :cancel
post :unschedule
post :retry post :retry
post :play post :play
post :erase post :erase
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