aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-11 14:14:01 +0100
committerChocobozzz <me@florianbigard.com>2019-12-11 14:14:01 +0100
commit566c125d6eee3bd907404523d94e1e0b5e403a46 (patch)
treec477cdd2ba745015d80052968c37927b1bca1254 /shared/extra-utils
parent92e0f42e8ce5f1ab5e4023900b8194627231a11b (diff)
downloadPeerTube-566c125d6eee3bd907404523d94e1e0b5e403a46.tar.gz
PeerTube-566c125d6eee3bd907404523d94e1e0b5e403a46.tar.zst
PeerTube-566c125d6eee3bd907404523d94e1e0b5e403a46.zip
Serve audit logs to client
Diffstat (limited to 'shared/extra-utils')
-rw-r--r--shared/extra-utils/logs/logs.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/shared/extra-utils/logs/logs.ts b/shared/extra-utils/logs/logs.ts
index cbb1afb93..c494c1f1e 100644
--- a/shared/extra-utils/logs/logs.ts
+++ b/shared/extra-utils/logs/logs.ts
@@ -13,6 +13,19 @@ function getLogs (url: string, accessToken: string, startDate: Date, endDate?: D
13 }) 13 })
14} 14}
15 15
16function getAuditLogs (url: string, accessToken: string, startDate: Date, endDate?: Date) {
17 const path = '/api/v1/server/audit-logs'
18
19 return makeGetRequest({
20 url,
21 path,
22 token: accessToken,
23 query: { startDate, endDate },
24 statusCodeExpected: 200
25 })
26}
27
16export { 28export {
17 getLogs 29 getLogs,
30 getAuditLogs
18} 31}