Add pagination to moderation logs

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-04-27 17:53:11 +02:00
parent 6646391558
commit 495fbda330
11 changed files with 231 additions and 110 deletions

View File

@@ -158,51 +158,54 @@ export const CREATE_REPORT_NOTE = gql`
`;
export const LOGS = gql`
query {
actionLogs {
id
action
actor {
query ActionLogs($page: Int, $limit: Int) {
actionLogs(page: $page, limit: $limit) {
elements {
id
preferredUsername
domain
avatar {
action
actor {
id
url
}
}
object {
... on Report {
id
}
... on ReportNote {
report {
preferredUsername
domain
avatar {
id
url
}
}
... on Event {
id
title
}
... on Person {
id
preferredUsername
domain
name
}
... on Group {
id
preferredUsername
domain
name
}
... on User {
id
email
confirmedAt
object {
... on Report {
id
}
... on ReportNote {
report {
id
}
}
... on Event {
id
title
}
... on Person {
id
preferredUsername
domain
name
}
... on Group {
id
preferredUsername
domain
name
}
... on User {
id
email
confirmedAt
}
}
insertedAt
}
insertedAt
total
}
}
`;