Refactor for authorization sanity

This commit is contained in:
2015-02-19 16:29:17 +01:00
parent a1474e934a
commit 5b3c1a9007
22 changed files with 190 additions and 80 deletions
@@ -142,6 +142,19 @@ module Suppliers
format.json { head :no_content }
end
end
# POST /supplier/lists/1/close
def close
@list = List.find_by_supplier_id_and_id(current_supplier.id, params[:id])
@list.close!
head :ok
end
# POST /supplier/lists/1/mark_helped
def mark_helped
@list = List.find_by_supplier_id_and_id(current_supplier.id, params[:id])
@list.mark_helped!
head :ok
end
private