chore: Expose widget config via an API (#2645)

Expose widget config via an API so that the UI could be detached from the rails Application.
This commit is contained in:
Sojan Jose
2021-07-21 01:26:32 +05:30
committed by GitHub
parent caf8669db5
commit a0886d37bc
8 changed files with 142 additions and 12 deletions

View File

@@ -94,6 +94,10 @@ class Api::V1::Widget::BaseController < ApplicationController
{ timestamp: permitted_params[:message][:timestamp] }
end
def permitted_params
params.permit(:website_token)
end
def message_params
{
account_id: conversation.account_id,