mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Fix search query
This commit is contained in:
parent
dbaa8e687f
commit
fdc0d808f6
@ -1,7 +1,7 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const BlockedUsers = () => {
|
||||
return gql(`
|
||||
return gql`
|
||||
{
|
||||
blockedUsers {
|
||||
id
|
||||
@ -13,27 +13,31 @@ export const BlockedUsers = () => {
|
||||
deleted
|
||||
}
|
||||
}
|
||||
`)
|
||||
`
|
||||
}
|
||||
|
||||
export const Block = () => {
|
||||
return gql(`mutation($id:ID!) {
|
||||
block(id: $id) {
|
||||
id
|
||||
name
|
||||
isBlocked
|
||||
followedByCurrentUser
|
||||
return gql`
|
||||
mutation($id: ID!) {
|
||||
block(id: $id) {
|
||||
id
|
||||
name
|
||||
isBlocked
|
||||
followedByCurrentUser
|
||||
}
|
||||
}
|
||||
}`)
|
||||
`
|
||||
}
|
||||
|
||||
export const Unblock = () => {
|
||||
return gql(`mutation($id:ID!) {
|
||||
unblock(id: $id) {
|
||||
id
|
||||
name
|
||||
isBlocked
|
||||
followedByCurrentUser
|
||||
return gql`
|
||||
mutation($id: ID!) {
|
||||
unblock(id: $id) {
|
||||
id
|
||||
name
|
||||
isBlocked
|
||||
followedByCurrentUser
|
||||
}
|
||||
}
|
||||
}`)
|
||||
`
|
||||
}
|
||||
|
||||
@ -255,9 +255,8 @@ import ContentMenu from '~/components/ContentMenu'
|
||||
import HcUpload from '~/components/Upload'
|
||||
import HcAvatar from '~/components/Avatar/Avatar.vue'
|
||||
import { filterPosts } from '~/graphql/PostQuery'
|
||||
// import PostQuery from '~/graphql/UserProfile/Post.js'
|
||||
import UserQuery from '~/graphql/User'
|
||||
import { Block, Unblock } from '~/graphql/settings/BlockedUsers.js'
|
||||
import { Block, Unblock } from '~/graphql/settings/BlockedUsers'
|
||||
|
||||
const tabToFilterMapping = ({ tab, id }) => {
|
||||
return {
|
||||
|
||||
@ -45,15 +45,14 @@ export const actions = {
|
||||
commit('SET_QUICK_PENDING', true)
|
||||
await this.app.apolloProvider.defaultClient
|
||||
.query({
|
||||
query: gql(`
|
||||
query: gql`
|
||||
query findPosts($query: String!) {
|
||||
findPosts(query: $query, limit: 10) {
|
||||
id
|
||||
slug
|
||||
label: title
|
||||
value: title,
|
||||
value: title
|
||||
shoutedCount
|
||||
commentedCount
|
||||
createdAt
|
||||
author {
|
||||
id
|
||||
@ -62,7 +61,7 @@ export const actions = {
|
||||
}
|
||||
}
|
||||
}
|
||||
`),
|
||||
`,
|
||||
variables: {
|
||||
query: value.replace(/\s/g, '~ ') + '~',
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user