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