Removed json response

This commit is contained in:
2024-08-13 10:54:26 +02:00
parent ead82a9222
commit 3a660d42de
5 changed files with 0 additions and 14 deletions

View File

@@ -19,10 +19,8 @@ class JobsController < ApplicationController
Turbo::StreamsChannel.broadcast_prepend_later_to "jobs", target: :jobs, partial: "jobs/job_tr",
locals: { job: @job }
format.html { redirect_to jobs_url }
format.json { render :show, status: :created, location: @job }
else
format.html { render :new, status: :unprocessable_entity }
format.json { render json: @job.errors, status: :unprocessable_entity }
end
end
end
@@ -39,7 +37,6 @@ class JobsController < ApplicationController
broadcast_update_job
format.turbo_stream
format.html { redirect_to jobs_url }
format.json { head :no_content }
end
end

View File

@@ -11,7 +11,6 @@ class Operator::JobsController < ApplicationController
@paidcanceledjobs = Job.paidcanceled.status_changed_today.order(:status_changed_at)
end
# GET /jobs/1 or /jobs/1.json
def show; end
@@ -33,10 +32,8 @@ class Operator::JobsController < ApplicationController
Turbo::StreamsChannel.broadcast_prepend_later_to "jobs", target: :jobs, partial: "jobs/job_tr",
locals: { job: @job }
format.html { redirect_to jobs_url }
format.json { render :show, status: :created, location: @job }
else
format.html { render :new, status: :unprocessable_entity }
format.json { render json: @job.errors, status: :unprocessable_entity }
end
end
end
@@ -47,10 +44,8 @@ class Operator::JobsController < ApplicationController
if @job.update(job_params)
broadcast_update_job
format.html { redirect_to jobs_url, notice: "Job was successfully updated." }
format.json { render :show, status: :ok, location: @job }
else
format.html { render :edit, status: :unprocessable_entity }
format.json { render json: @job.errors, status: :unprocessable_entity }
end
end
end
@@ -66,7 +61,6 @@ class Operator::JobsController < ApplicationController
broadcast_update_job
format.turbo_stream
format.html { redirect_to jobs_url }
format.json { head :no_content }
end
end
@@ -77,7 +71,6 @@ class Operator::JobsController < ApplicationController
respond_to do |format|
Turbo::StreamsChannel.broadcast_remove_to "jobs", target: @job
format.html { redirect_to jobs_url, notice: "Job was successfully destroyed." }
format.json { head :no_content }
end
end