2012-05-18 13:54:48 +00:00
|
|
|
module ExtraRoutes
|
2013-08-06 22:10:28 +00:00
|
|
|
def add(map, api_path)
|
2012-05-18 13:54:48 +00:00
|
|
|
|
|
|
|
# tickets
|
2013-08-06 22:10:28 +00:00
|
|
|
map.match api_path + '/tickets/search', :to => 'tickets#search', :via => [:get, :post]
|
|
|
|
map.match api_path + '/tickets', :to => 'tickets#index', :via => :get
|
|
|
|
map.match api_path + '/tickets/:id', :to => 'tickets#show', :via => :get
|
|
|
|
map.match api_path + '/tickets', :to => 'tickets#create', :via => :post
|
|
|
|
map.match api_path + '/tickets/:id', :to => 'tickets#update', :via => :put
|
|
|
|
map.match api_path + '/ticket_create', :to => 'tickets#ticket_create', :via => :get
|
|
|
|
map.match api_path + '/ticket_full/:id', :to => 'tickets#ticket_full', :via => :get
|
|
|
|
map.match api_path + '/ticket_history/:id', :to => 'tickets#ticket_history', :via => :get
|
|
|
|
map.match api_path + '/ticket_customer', :to => 'tickets#ticket_customer', :via => :get
|
|
|
|
map.match api_path + '/ticket_merge_list/:ticket_id', :to => 'tickets#ticket_merge_list', :via => :get
|
|
|
|
map.match api_path + '/ticket_merge/:slave_ticket_id/:master_ticket_number', :to => 'tickets#ticket_merge', :via => :get
|
2012-05-18 13:54:48 +00:00
|
|
|
|
2012-09-20 12:08:02 +00:00
|
|
|
# ticket overviews
|
2013-08-21 09:18:34 +00:00
|
|
|
map.match api_path + '/ticket_overviews', :to => 'ticket_overviews#show', :via => :get
|
2012-07-04 21:36:39 +00:00
|
|
|
|
2012-09-20 12:08:02 +00:00
|
|
|
# ticket priority
|
2013-08-06 22:10:28 +00:00
|
|
|
map.match api_path + '/ticket_priorities', :to => 'ticket_priorities#index', :via => :get
|
|
|
|
map.match api_path + '/ticket_priorities/:id', :to => 'ticket_priorities#show', :via => :get
|
|
|
|
map.match api_path + '/ticket_priorities', :to => 'ticket_priorities#create', :via => :post
|
|
|
|
map.match api_path + '/ticket_priorities/:id', :to => 'ticket_priorities#update', :via => :put
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
# ticket state
|
2013-08-06 22:10:28 +00:00
|
|
|
map.match api_path + '/ticket_states', :to => 'ticket_states#index', :via => :get
|
|
|
|
map.match api_path + '/ticket_states/:id', :to => 'ticket_states#show', :via => :get
|
|
|
|
map.match api_path + '/ticket_states', :to => 'ticket_states#create', :via => :post
|
|
|
|
map.match api_path + '/ticket_states/:id', :to => 'ticket_states#update', :via => :put
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
# ticket articles
|
2013-08-06 22:10:28 +00:00
|
|
|
map.match api_path + '/ticket_articles', :to => 'ticket_articles#index', :via => :get
|
|
|
|
map.match api_path + '/ticket_articles/:id', :to => 'ticket_articles#show', :via => :get
|
|
|
|
map.match api_path + '/ticket_articles', :to => 'ticket_articles#create', :via => :post
|
|
|
|
map.match api_path + '/ticket_articles/:id', :to => 'ticket_articles#update', :via => :put
|
|
|
|
map.match api_path + '/ticket_attachment/:ticket_id/:article_id/:id', :to => 'ticket_articles#attachment', :via => :get
|
|
|
|
map.match api_path + '/ticket_attachment_new', :to => 'ticket_articles#attachment_new', :via => :post
|
|
|
|
map.match api_path + '/ticket_article_plain/:id', :to => 'ticket_articles#article_plain', :via => :get
|
2012-07-19 21:31:57 +00:00
|
|
|
|
2012-05-18 13:54:48 +00:00
|
|
|
end
|
|
|
|
module_function :add
|
2013-05-29 15:07:45 +00:00
|
|
|
end
|