feat: Audit log APIs (#6434)

- Adds the appropriate APIs for Audit Logs.

ref: #6015
This commit is contained in:
Vishnu Narayanan
2023-03-01 20:02:58 +05:30
committed by GitHub
parent daf17046e9
commit d870b0815a
21 changed files with 261 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
# 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