Skip to content

Commit

Permalink
change PATCH to POST
Browse files Browse the repository at this point in the history
  • Loading branch information
ashton22305 committed Oct 25, 2024
1 parent ef811af commit 77f4355
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def delete_job
end
end

# PATCH /projects/:project_id/jobs/:cluster/:jobid/stop
# POST /projects/:project_id/jobs/:cluster/:jobid/stop
def stop_job
cluster_str = job_details_params[:cluster].to_s
cluster = OodAppkit.clusters[cluster_str.to_sym]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= button_to(
'Stop',
project_stop_job_path(project_id: project_id, cluster: cluster, jobid: id),
method: :patch,
method: :post,
class: 'btn btn-danger'
) %>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= button_to(
'Stop',
project_stop_job_path(project_id: project_id, cluster: cluster, jobid: id),
method: :patch,
method: :post,
class: 'btn btn-danger'
) %>
2 changes: 1 addition & 1 deletion apps/dashboard/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
root 'projects#index'
get '/jobs/:cluster/:jobid' => 'projects#job_details', :defaults => { :format => 'turbo_stream' }, :as => 'job_details'
delete '/jobs/:cluster/:jobid' => 'projects#delete_job', :as => 'delete_job'
patch '/jobs/:cluster/:jobid/stop' => 'projects#stop_job', :as => 'stop_job'
post '/jobs/:cluster/:jobid/stop' => 'projects#stop_job', :as => 'stop_job'

resources :launchers do
post 'submit', on: :member
Expand Down

0 comments on commit 77f4355

Please sign in to comment.