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

@@ -178,15 +178,10 @@ export default class CreateGroup extends mixins(IdentityEditionMixin) {
};
}
const currentActor = {
creatorActorId: this.currentActor.id,
};
return {
...this.group,
...avatarObj,
...bannerObj,
...currentActor,
};
}

View File

@@ -481,18 +481,10 @@ export default class Group extends mixins(GroupMixin) {
// @ts-ignore
this.$refs.reportModal.close();
const groupTitle = this.group.name || usernameWithDomain(this.group);
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: {
reporterId,
reportedId: this.group.id,
content,
forward,