Run rubocop --fix-layout and remove encoding comments
This commit is contained in:
parent
fa63e6e81d
commit
ea2862fdef
283 changed files with 1164 additions and 1969 deletions
|
|
@ -36,6 +36,7 @@ class PrinterController < ApplicationController
|
|||
json = JSON.parse data, symbolize_names: true
|
||||
job = PrinterJob.unfinished.find_by_id(json[:id])
|
||||
return unless job
|
||||
|
||||
if json[:state]
|
||||
job.add_update! json[:state], json[:message]
|
||||
end
|
||||
|
|
@ -54,5 +55,4 @@ class PrinterController < ApplicationController
|
|||
return head(:unauthorized) unless bearer_token
|
||||
return head(:forbidden) if bearer_token != FoodsoftConfig[:printer_token]
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class PrinterJobsController < ApplicationController
|
|||
PrinterJob.transaction do
|
||||
%w(articles fax groups matrix).each do |document|
|
||||
next unless FoodsoftConfig["printer_print_order_#{document}"]
|
||||
|
||||
job = PrinterJob.create! order: order, document: document, created_by: current_user
|
||||
job.add_update! state
|
||||
count += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue