mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
feat(backend): create/update post with post type
This commit is contained in:
parent
84811d8937
commit
6d377ecaaa
@ -125,6 +125,7 @@ export default {
|
||||
SET post.updatedAt = toString(datetime())
|
||||
SET post.clickedCount = 0
|
||||
SET post.viewedTeaserCount = 0
|
||||
SET post:${params.postType}
|
||||
WITH post
|
||||
MATCH (author:User {id: $userId})
|
||||
MERGE (post)<-[:WROTE]-(author)
|
||||
|
||||
4
backend/src/schema/types/enum/PostType.gql
Normal file
4
backend/src/schema/types/enum/PostType.gql
Normal file
@ -0,0 +1,4 @@
|
||||
enum PostType {
|
||||
Article
|
||||
Event
|
||||
}
|
||||
@ -189,6 +189,7 @@ type Mutation {
|
||||
categoryIds: [ID]
|
||||
contentExcerpt: String
|
||||
groupId: ID
|
||||
postType: PostType = Article
|
||||
): Post
|
||||
UpdatePost(
|
||||
id: ID!
|
||||
@ -200,6 +201,7 @@ type Mutation {
|
||||
visibility: Visibility
|
||||
language: String
|
||||
categoryIds: [ID]
|
||||
postType: PostType
|
||||
): Post
|
||||
DeletePost(id: ID!): Post
|
||||
AddPostEmotions(to: _PostInput!, data: _EMOTEDInput!): EMOTED
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user