diff --git a/backend/src/schema/resolvers/posts.js b/backend/src/schema/resolvers/posts.js index c7c4abdca..efb991cf8 100644 --- a/backend/src/schema/resolvers/posts.js +++ b/backend/src/schema/resolvers/posts.js @@ -121,7 +121,6 @@ export default { } finally { session.close() } - return post }, UpdatePost: async (_parent, params, context, _resolveInfo) => { @@ -297,7 +296,15 @@ export default { }, Post: { ...Resolver('Post', { - undefinedToNull: ['activityId', 'objectId', 'image', 'language', 'pinnedAt', 'pinned', 'teaserImageHeight'], + undefinedToNull: [ + 'activityId', + 'objectId', + 'image', + 'language', + 'pinnedAt', + 'pinned', + 'imageAspectRatio', + ], hasMany: { tags: '-[:TAGGED]->(related:Tag)', categories: '-[:CATEGORIZED]->(related:Category)', diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/schema/types/type/Post.gql index fd8955db8..f8cc3eee3 100644 --- a/backend/src/schema/types/type/Post.gql +++ b/backend/src/schema/types/type/Post.gql @@ -118,7 +118,7 @@ type Post { contentExcerpt: String image: String imageUpload: Upload - teaserImageHeight: String + imageAspectRatio: Float visibility: Visibility deleted: Boolean disabled: Boolean @@ -183,6 +183,7 @@ type Mutation { language: String categoryIds: [ID] contentExcerpt: String + imageAspectRatio: Float ): Post UpdatePost( id: ID! @@ -195,7 +196,7 @@ type Mutation { visibility: Visibility language: String categoryIds: [ID] - teaserImageHeight: String + imageAspectRatio: Float ): Post DeletePost(id: ID!): Post AddPostEmotions(to: _PostInput!, data: _EMOTEDInput!): EMOTED @@ -220,6 +221,7 @@ type Query { offset: Int orderBy: [_PostOrdering] filter: _PostFilter + imageAspectRatio: Float ): [Post] PostsEmotionsCountByEmotion(postId: ID!, data: _EMOTEDInput!): Int! PostsEmotionsByCurrentUser(postId: ID!): [String] diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index 8b55772e3..ec9fe9616 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -7,7 +7,11 @@ @submit="submit" >