4 Commits

Author SHA1 Message Date
63218e7f42 Fixed formating 2024-08-19 23:28:54 -04:00
7f0bb3cae7 Removed extra end 2024-08-19 23:26:43 -04:00
ad7417c233 Moved work into thread to repsond quickly 2024-08-19 23:21:56 -04:00
cf0be2336b Removed sync button from sidebar 2024-08-19 23:12:20 -04:00
2 changed files with 36 additions and 35 deletions

View File

@@ -85,6 +85,7 @@ class QboController < ApplicationController
# proceed if the request is good # proceed if the request is good
if hash.eql? signature if hash.eql? signature
Thread.new do
if request.headers['content-type'] == 'application/json' if request.headers['content-type'] == 'application/json'
data = JSON.parse(data) data = JSON.parse(data)
else else
@@ -122,7 +123,8 @@ class QboController < ApplicationController
# Record that last time we updated # Record that last time we updated
Qbo.update_time_stamp Qbo.update_time_stamp
ActiveRecord::Base.connection.close
end
# The webhook doesn't require a response but let's make sure we don't send anything # The webhook doesn't require a response but let's make sure we don't send anything
render :nothing => true, status: 200 render :nothing => true, status: 200
else else

View File

@@ -3,4 +3,3 @@
<%= submit_tag t(:label_search) %> <%= submit_tag t(:label_search) %>
<% end %> <% end %>
<%= button_to t(:label_new_customer), new_customer_path, method: :get%> <%= button_to t(:label_new_customer), new_customer_path, method: :get%>
<%= button_to(t(:label_sync), qbo_sync_path, method: :get) if User.current.admin?%>