Cleaning up backend, bugfix in frontend

This commit is contained in:
Moriz Wahl 2019-12-10 12:34:12 +01:00
parent 72e4d0abbc
commit bdbabc2d12
4 changed files with 115 additions and 112 deletions

View File

@ -48,7 +48,7 @@ export default {
},
findPosts: async (object, params, context, resolveInfo) => {
params = await filterForBlockedUsers(params, context)
return neo4jgraphql(object, params, context, resolveInfo, true)
return neo4jgraphql(object, params, context, resolveInfo)
},
profilePagePosts: async (object, params, context, resolveInfo) => {
params = await filterForBlockedUsers(params, context)

View File

@ -226,8 +226,6 @@ type Query {
PostsEmotionsCountByEmotion(postId: ID!, data: _EMOTEDInput!): Int!
PostsEmotionsByCurrentUser(postId: ID!): [String]
profilePagePosts(filter: _PostFilter, first: Int, offset: Int, orderBy: [_PostOrdering]): [Post]
isLoggedIn: Boolean!
currentUser: User
findPosts(query: String!, limit: Int = 10, filter: _PostFilter): [Post]!
@cypher(
statement: """

View File

@ -161,6 +161,7 @@ type Query {
): [User]
blockedUsers: [User]
isLoggedIn: Boolean!
currentUser: User
findUsers(query: String!,limit: Int = 10, filter: _UserFilter): [User]!
@cypher(

View File

@ -44,8 +44,8 @@
</ds-heading>
</ds-flex-item>
</ds-flex>
<ds-flex v-else-if="option.__typename === 'User'">
<ds-flex-item class="search-option">
<ds-flex v-if="option.__typename === 'User'">
<ds-flex-item class="search-option" :class="{'extra-space': isFirstOfType(option)}">
<ds-avatar class="avatar" name="option.name" image="option.avatar" />
<div>
<ds-text class="userinfo">
@ -57,7 +57,7 @@
</ds-text>
</ds-flex-item>
</ds-flex>
<ds-flex v-else>
<ds-flex v-if="option.__typename === 'Post'">
<ds-flex-item class="search-option-label">
<ds-text>{{ option.title | truncate(70) }}</ds-text>
</ds-flex-item>
@ -311,5 +311,9 @@ export default {
.username {
color: #17b53f;
}
.extra-space {
margin-top: 8px;
padding-top: 4px;
}
}
</style>