Improve GraphQL documentation and cleanup API

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-19 17:06:28 +01:00
parent e8a3b6aa94
commit 3eacbb2ca3
87 changed files with 6542 additions and 6314 deletions

View File

@@ -90,7 +90,7 @@ export default class EventMixin extends mixins(Vue) {
this.$notifier.success(this.$t("You have cancelled your participation") as string);
}
protected async openDeleteEventModal(event: IEvent, currentActor: IPerson): Promise<void> {
protected async openDeleteEventModal(event: IEvent): Promise<void> {
function escapeRegExp(string: string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
}
@@ -115,11 +115,11 @@ export default class EventMixin extends mixins(Vue) {
placeholder: event.title,
pattern: escapeRegExp(event.title),
},
onConfirm: () => this.deleteEvent(event, currentActor),
onConfirm: () => this.deleteEvent(event),
});
}
private async deleteEvent(event: IEvent, currentActor: IPerson) {
private async deleteEvent(event: IEvent) {
const eventTitle = event.title;
try {
@@ -127,7 +127,6 @@ export default class EventMixin extends mixins(Vue) {
mutation: DELETE_EVENT,
variables: {
eventId: event.id,
actorId: currentActor.id,
},
});
/**