Files
leadchat/enterprise/app/controllers/api/v1/accounts/audit_logs_controller.rb
Vishnu Narayanan d870b0815a feat: Audit log APIs (#6434)
- Adds the appropriate APIs for Audit Logs.

ref: #6015
2023-03-01 20:02:58 +05:30

16 lines
389 B
Ruby

# module Enterprise::Api::V1::Accounts::AuditLogsController < Api::V1::Accounts::BaseController
class Api::V1::Accounts::AuditLogsController < Api::V1::Accounts::BaseController
before_action :check_admin_authorization?
before_action :fetch_audit
def show
render json: @audit_logs
end
private
def fetch_audit
@audit_logs = Current.account.associated_audits
end
end