You've already forked AstralRinth
forked from didirus/AstralRinth
Fix notifications fetching (#776)
This commit is contained in:
@@ -57,14 +57,14 @@ export const actions = {
|
|||||||
async fetchNotifications({ commit, rootState }) {
|
async fetchNotifications({ commit, rootState }) {
|
||||||
if (rootState.auth.user && rootState.auth.user.id) {
|
if (rootState.auth.user && rootState.auth.user.id) {
|
||||||
try {
|
try {
|
||||||
const follows = (
|
const notifications = (
|
||||||
await this.$axios.get(
|
await this.$axios.get(
|
||||||
`user/${rootState.auth.user.id}/notifications`,
|
`user/${rootState.auth.user.id}/notifications`,
|
||||||
rootState.auth.headers
|
rootState.auth.headers
|
||||||
)
|
)
|
||||||
).data
|
).data
|
||||||
|
|
||||||
commit('SET_FOLLOWS', follows)
|
commit('SET_NOTIFICATIONS', notifications)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user