Improve GraphQL documentation and cleanup API
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -288,7 +288,6 @@ export default class Comment extends Vue {
|
||||
mutation: CREATE_REPORT,
|
||||
variables: {
|
||||
eventId: this.event.id,
|
||||
reporterId: this.currentActor.id,
|
||||
reportedId: this.comment.actor.id,
|
||||
commentsIds: [this.comment.id],
|
||||
content,
|
||||
|
||||
@@ -112,7 +112,6 @@ export default class CommentTree extends Vue {
|
||||
mutation: CREATE_COMMENT_FROM_EVENT,
|
||||
variables: {
|
||||
eventId: this.event.id,
|
||||
actorId: comment.actor.id,
|
||||
text: comment.text,
|
||||
inReplyToCommentId: comment.inReplyToComment ? comment.inReplyToComment.id : null,
|
||||
},
|
||||
@@ -204,7 +203,6 @@ export default class CommentTree extends Vue {
|
||||
mutation: DELETE_COMMENT,
|
||||
variables: {
|
||||
commentId: comment.id,
|
||||
actorId: this.currentActor.id,
|
||||
},
|
||||
update: (store, { data }) => {
|
||||
if (data == null) return;
|
||||
|
||||
@@ -530,7 +530,6 @@ export default class EditorComponent extends Vue {
|
||||
variables: {
|
||||
file: image,
|
||||
name: image.name,
|
||||
actorId: this.currentActor.id,
|
||||
},
|
||||
});
|
||||
if (data.uploadPicture && data.uploadPicture.url) {
|
||||
|
||||
@@ -88,15 +88,12 @@ export default class Image extends Node {
|
||||
});
|
||||
if (!coordinates) return false;
|
||||
const client = apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
|
||||
const editorElem = document.getElementById("tiptab-editor");
|
||||
const actorId = editorElem && editorElem.dataset.actorId;
|
||||
|
||||
try {
|
||||
images.forEach(async (image) => {
|
||||
const { data } = await client.mutate({
|
||||
mutation: UPLOAD_PICTURE,
|
||||
variables: {
|
||||
actorId,
|
||||
file: image,
|
||||
name: image.name,
|
||||
},
|
||||
|
||||
@@ -246,7 +246,7 @@ export default class EventListCard extends mixins(ActorMixin, EventMixin) {
|
||||
async openDeleteEventModalWrapper(): Promise<void> {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
await this.openDeleteEventModal(this.participation.event, this.currentActor);
|
||||
await this.openDeleteEventModal(this.participation.event);
|
||||
}
|
||||
|
||||
async gotToWithCheck(participation: IParticipant, route: RawLocation): Promise<Route> {
|
||||
|
||||
@@ -127,7 +127,6 @@ export default class ParticipationWithoutAccount extends Vue {
|
||||
mutation: JOIN_EVENT,
|
||||
variables: {
|
||||
eventId: this.event.id,
|
||||
actorId: this.config.anonymous.actorId,
|
||||
email: this.anonymousParticipation.email,
|
||||
message: this.anonymousParticipation.message,
|
||||
locale: this.$i18n.locale,
|
||||
|
||||
Reference in New Issue
Block a user