core_workflows_controller.rb 732 B

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class CoreWorkflowsController < ApplicationController
  3. prepend_before_action :authenticate_and_authorize!
  4. def index
  5. model_index_render(CoreWorkflow.changeable, params)
  6. end
  7. def show
  8. model_show_render(CoreWorkflow.changeable, params)
  9. end
  10. def create
  11. model_create_render(CoreWorkflow.changeable, params)
  12. end
  13. def update
  14. model_update_render(CoreWorkflow.changeable, params)
  15. end
  16. def search
  17. model_search_render(CoreWorkflow, params)
  18. end
  19. def destroy
  20. model_destroy_render(CoreWorkflow.changeable, params)
  21. end
  22. def perform
  23. render json: CoreWorkflow.perform(payload: params, user: current_user)
  24. end
  25. end