config/routes.rb in stockor-0.3.0 vs config/routes.rb in stockor-0.4.0
- old
+ new
@@ -1,6 +1,7 @@
require 'stockor'
+require_rel "../lib/skr/handlers/*.rb"
Lanes::API.routes.for_extension 'skr' do
resources Skr::CustomerProject
resources Skr::TimeEntry
@@ -34,20 +35,21 @@
resources Skr::PoLine
resources Skr::Voucher
resources Skr::VoLine
resources Skr::SalesOrder
resources Skr::SoLine
+ resources Skr::SequentialId, controller: Skr::Handlers::SequentialIds
+ resources Skr::Invoice, controller: Skr::Handlers::InvoiceFromTimeEntries,
+ path: 'invoices/from-time-entries'
+ resources Skr::Sku, path: 'public/skus', controller: Skr::Handlers::Skus, cors: '*', public: true
+ resources Skr::Invoice, path: 'public/sales', controller: Skr::Handlers::Sales, cors: '*', public: true
+ get 'credit-card-gateways.json', &Skr::Handlers::CreditCardGateway.get
+ post 'credit-card-gateways.json', &Skr::Handlers::CreditCardGateway.update
+ post 'fresh-books-imports.json', &Skr::Handlers::FreshBooksImport.handler
- post 'invoices/from-time-entries.json',
- &Skr::Handlers::InvoiceFromTimeEntries.handler
-
get 'print/:type/:id.pdf' do
content_type 'application/pdf'
form = Skr::Print::Form.new(params[:type], params[:id])
form.as_pdf
end
-
- post 'fresh-books-imports.json',
- &Skr::Handlers::FreshBooksImport.handler
-
end