supplier client sections working with problematic authentication still active
This commit is contained in:
@@ -6,6 +6,7 @@ module Suppliers
|
||||
end
|
||||
|
||||
def create
|
||||
@section_area = SectionArea.new(section_area_params)
|
||||
@section_area.supplier = current_supplier
|
||||
if @section_area.save
|
||||
render json: @section_area
|
||||
@@ -15,6 +16,7 @@ module Suppliers
|
||||
end
|
||||
|
||||
def update
|
||||
@section_area = SectionArea.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
|
||||
if @section_area.update_attributes section_area_params
|
||||
render json: @section_area
|
||||
else
|
||||
@@ -23,6 +25,7 @@ module Suppliers
|
||||
end
|
||||
|
||||
def destroy
|
||||
@section_area= SectionArea.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
|
||||
@section_area.destroy
|
||||
head :no_content
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user