feed_tokens_controller.rb 448 B

1234567891011121314151617
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class KnowledgeBase::FeedTokensController < ApplicationController
  3. prepend_before_action :authentication_check
  4. def show
  5. token = Token.ensure_token! 'KnowledgeBaseFeed', persistent: true
  6. render json: { token: token }
  7. end
  8. def update
  9. new_token = Token.renew_token! 'KnowledgeBaseFeed', persistent: true
  10. render json: { token: new_token }
  11. end
  12. end