19 lines
437 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
class DiscourseChatIntegration::PublicController < ApplicationController
requires_plugin DiscourseChatIntegration::PLUGIN_NAME
def post_transcript
params.require(:secret)
2017-10-03 17:42:07 +08:00
redis_key = "chat_integration:transcript:#{params[:secret]}"
content = Discourse.redis.get(redis_key)
if content
2017-08-01 20:53:39 +01:00
render json: { content: content }
2017-10-03 17:42:07 +08:00
else
raise Discourse::NotFound
end
end
2017-08-01 20:53:39 +01:00
end