Improve GraphQL documentation and cleanup API
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -761,7 +761,7 @@ export default class Event extends EventMixin {
|
||||
* Delete the event, then redirect to home.
|
||||
*/
|
||||
async openDeleteEventModalWrapper(): Promise<void> {
|
||||
await this.openDeleteEventModal(this.event, this.currentActor);
|
||||
await this.openDeleteEventModal(this.event);
|
||||
}
|
||||
|
||||
async reportEvent(content: string, forward: boolean): Promise<void> {
|
||||
@@ -771,19 +771,12 @@ export default class Event extends EventMixin {
|
||||
this.$refs.reportModal.close();
|
||||
if (!this.event.organizerActor) return;
|
||||
const eventTitle = this.event.title;
|
||||
let reporterId = null;
|
||||
if (this.currentActor.id) {
|
||||
reporterId = this.currentActor.id;
|
||||
} else if (this.config.anonymous.reports.allowed) {
|
||||
reporterId = this.config.anonymous.actorId;
|
||||
}
|
||||
if (!reporterId) return;
|
||||
|
||||
try {
|
||||
await this.$apollo.mutate<IReport>({
|
||||
mutation: CREATE_REPORT,
|
||||
variables: {
|
||||
eventId: this.event.id,
|
||||
reporterId,
|
||||
reportedId: this.actorForReport ? this.actorForReport.id : null,
|
||||
content,
|
||||
forward,
|
||||
@@ -808,7 +801,6 @@ export default class Event extends EventMixin {
|
||||
mutation: JOIN_EVENT,
|
||||
variables: {
|
||||
eventId: this.event.id,
|
||||
actorId: identity.id,
|
||||
message,
|
||||
},
|
||||
update: (store, { data }) => {
|
||||
|
||||
@@ -214,7 +214,6 @@ const MESSAGE_ELLIPSIS_LENGTH = 130;
|
||||
page: 1,
|
||||
limit: PARTICIPANTS_PER_PAGE,
|
||||
roles: this.roles,
|
||||
actorId: this.currentActor.id,
|
||||
};
|
||||
},
|
||||
skip() {
|
||||
@@ -298,7 +297,6 @@ export default class Participants extends Vue {
|
||||
mutation: UPDATE_PARTICIPANT,
|
||||
variables: {
|
||||
id: participant.id,
|
||||
moderatorActorId: this.currentActor.id,
|
||||
role: ParticipantRole.PARTICIPANT,
|
||||
},
|
||||
});
|
||||
@@ -313,7 +311,6 @@ export default class Participants extends Vue {
|
||||
mutation: UPDATE_PARTICIPANT,
|
||||
variables: {
|
||||
id: participant.id,
|
||||
moderatorActorId: this.currentActor.id,
|
||||
role: ParticipantRole.REJECTED,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user