Skip to content

Commit 522d4b3

Browse files
committed
Show sandbox status on show submission
1 parent 0e7b6d1 commit 522d4b3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

app/controllers/api/v8/core/submissions_controller.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,15 @@ def show
3838
@submission = Submission.find_by!(id: params[:id])
3939
unless @submission.processed?
4040
authorization_skip!
41+
sandbox_status = :created
42+
if @submission.processing_began_at
43+
sandbox_status = :processing_on_sandbox
44+
elsif @submission.processing_tried_at
45+
sandbox_status = :sending_to_sandbox
46+
end
4147
return render json: {
42-
status: :processing
48+
status: :processing,
49+
sandbox_status: sandbox_status
4350
}
4451
end
4552
unauthorize_guest!

0 commit comments

Comments
 (0)