channel_whatsapp.rb 762 B

123456789101112131415161718192021222324
  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. match api_path + '/channels_whatsapp_webhook/:callback_url_uuid', to: 'channels_whatsapp#verify_webhook', via: :get
  5. match api_path + '/channels_whatsapp_webhook/:callback_url_uuid', to: 'channels_whatsapp#perform_webhook', via: :post
  6. scope api_path do
  7. resources :channels_admin_whatsapp,
  8. controller: 'channels_admin/whatsapp',
  9. path: 'channels/admin/whatsapp',
  10. only: %i[index create update destroy] do
  11. member do
  12. post :enable
  13. post :disable
  14. end
  15. collection do
  16. post :preload
  17. end
  18. end
  19. end
  20. end