remove get_tax_profiles from api_controller and create tax_profiles api
This commit is contained in:
@@ -8,10 +8,6 @@ class Api::ApiController < ActionController::API
|
||||
# before_action :lookup_domain
|
||||
helper_method :current_token, :current_login_employee, :get_cashier
|
||||
|
||||
def get_tax_profiles
|
||||
@inclusive_tax, @exclusive_tax = TaxProfile.calculate_tax("online_order")
|
||||
end
|
||||
|
||||
private
|
||||
# ActionView::Rendering override render_to_body breaks render :json,
|
||||
# resulting in an ActionView::MissingTemplate error.
|
||||
|
||||
8
app/controllers/api/tax_profiles_controller.rb
Normal file
8
app/controllers/api/tax_profiles_controller.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Api::TaxProfilesController < Api::ApiController
|
||||
|
||||
def index
|
||||
@tax_profiles = TaxProfile.where(nil)
|
||||
@tax_profiles = @tax_profiles.filter_by_group_type(params[:group_type]) if params[:group_type].present?
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user