Files
chatwoot/app/controllers/microsoft_controller.rb
Shivam Mishra f6650b5025 feat: move Azure config to installation_config (#9481)
This PR has the following changes

1. Add `AZURE_APP_ID` and `AZURE_APP_SECRET` to installation config
2. Add Microsoft config to `super_admin/features.yml`
3. Replace usage of `ENV.fetch` with `GlobalConfigService.load` for
fetch App ID and Secret
2024-05-20 11:52:42 +05:30

18 lines
410 B
Ruby

class MicrosoftController < ApplicationController
after_action :set_version_header
def identity_association
microsoft_indentity
end
private
def set_version_header
response.headers['Content-Length'] = { associatedApplications: [{ applicationId: @identity_json }] }.to_json.length
end
def microsoft_indentity
@identity_json = GlobalConfigService.load('AZURE_APP_ID', nil)
end
end