Refactor adding tags to an event

Also refactor extracting tags from content, now uses Pleroma's Formatter

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-07-26 11:30:28 +02:00
parent 845d6ff857
commit 6d80bf43ea
23 changed files with 1543 additions and 864 deletions

View File

@@ -143,7 +143,8 @@ export const CREATE_EVENT = gql`
$organizerActorId: ID!,
$category: String!,
$beginsOn: DateTime!,
$picture: PictureInput!
$picture: PictureInput,
$tags: [String]
) {
createEvent(
title: $title,
@@ -151,7 +152,8 @@ export const CREATE_EVENT = gql`
beginsOn: $beginsOn,
organizerActorId: $organizerActorId,
category: $category,
picture: $picture
picture: $picture,
tags: $tags
) {
id,
uuid,
@@ -203,8 +205,10 @@ export const LEAVE_EVENT = gql`
export const DELETE_EVENT = gql`
mutation DeleteEvent($id: Int!, $actorId: Int!) {
deleteEvent(
id: $id,
eventId: $id,
actorId: $actorId
)
) {
id
}
}
`;

16
js/src/graphql/tags.ts Normal file
View File

@@ -0,0 +1,16 @@
import gql from 'graphql-tag';
export const TAGS = gql`
query {
tags {
id,
related {
id,
slug,
title
}
slug,
title
}
}
`;