Commit f6948631 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

display status when job is done

parent db6633c0
......@@ -71,7 +71,11 @@ class Api::V1::JobsController < Api::V1::ApiController
@job = Job.find(params[:id])
if @user.id == @job.user_id or @user.admin?
case @job.state
when "DONE" then render json: files_list
when "DONE" then
result = files_list
result[:status] = @job.status
render json: result
when "ARCHIVED" then render json: {status: "archived"}
else render json: {status: "in progress"}
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