mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix currentUser mutation
This commit is contained in:
parent
d4a4c9f362
commit
1c4b08ddba
@ -74,19 +74,18 @@ export const actions = {
|
|||||||
data: { currentUser }
|
data: { currentUser }
|
||||||
} = await client.query({
|
} = await client.query({
|
||||||
query: gql(`{
|
query: gql(`{
|
||||||
currentUser {
|
currentUser {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
slug
|
||||||
|
email
|
||||||
|
avatar
|
||||||
|
role
|
||||||
|
about
|
||||||
|
locationName
|
||||||
|
socialMedia {
|
||||||
id
|
id
|
||||||
name
|
url
|
||||||
slug
|
|
||||||
email
|
|
||||||
avatar
|
|
||||||
role
|
|
||||||
about
|
|
||||||
locationName
|
|
||||||
socialMedia {
|
|
||||||
id
|
|
||||||
url
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
notifications(read: false, orderBy: createdAt_desc) {
|
notifications(read: false, orderBy: createdAt_desc) {
|
||||||
id
|
id
|
||||||
@ -105,7 +104,8 @@ export const actions = {
|
|||||||
slug
|
slug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`)
|
}
|
||||||
|
}`)
|
||||||
})
|
})
|
||||||
if (!currentUser) return dispatch('logout')
|
if (!currentUser) return dispatch('logout')
|
||||||
commit('SET_USER', currentUser)
|
commit('SET_USER', currentUser)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user