mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
USER auto refresh
This commit is contained in:
@@ -2,7 +2,7 @@ import { API_URL } from '../config'
|
||||
import socketio from 'socket.io-client'
|
||||
import auth from './auth'
|
||||
import store from './store'
|
||||
import { updateArticle, destroyArticle } from './actions'
|
||||
import { updateUser, updateArticle, destroyArticle } from './actions'
|
||||
|
||||
export const CONN = 'CONN'
|
||||
export const ALERT = 'ALERT'
|
||||
@@ -27,6 +27,8 @@ io.on(ALERT, function (data) {
|
||||
|
||||
io.on(USER_UPDATE, function (data) {
|
||||
console.log(USER_UPDATE, data)
|
||||
let { user } = data
|
||||
store.dispatch(updateUser(user))
|
||||
})
|
||||
|
||||
io.on(ARTICLE_UPDATE, function (data) {
|
||||
|
||||
Reference in New Issue
Block a user