time_accounting.rb 1.3 KB

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. Zammad::Application.routes.draw do
  3. api_path = Rails.configuration.api_path
  4. # time_accountings
  5. match api_path + '/time_accountings', to: 'time_accountings#index', via: :get
  6. match api_path + '/time_accountings/:id', to: 'time_accountings#show', via: :get
  7. match api_path + '/time_accountings', to: 'time_accountings#create', via: :post
  8. match api_path + '/time_accountings/:id', to: 'time_accountings#update', via: :put
  9. match api_path + '/time_accountings/:id', to: 'time_accountings#destroy', via: :delete
  10. match api_path + '/time_accounting/log/by_activity/:year/:month', to: 'time_accountings#by_activity', via: :get
  11. match api_path + '/time_accounting/log/by_ticket/:year/:month', to: 'time_accountings#by_ticket', via: :get
  12. match api_path + '/time_accounting/log/by_customer/:year/:month', to: 'time_accountings#by_customer', via: :get
  13. match api_path + '/time_accounting/log/by_organization/:year/:month', to: 'time_accountings#by_organization', via: :get
  14. scope Rails.configuration.api_path do
  15. resources '/time_accounting/types', controller: 'time_accounting/types', only: %i[index create update]
  16. end
  17. end