Skip to content

Commit 87514dc

Browse files
committed
Backport auth sync silent errors fix
1 parent 7024332 commit 87514dc

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

frontend/src/initializers/auth-sync.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
import misago from "misago/index"
22
import { patch } from "misago/reducers/auth"
33
import ajax from "misago/services/ajax"
4-
import snackbar from "misago/services/snackbar"
54
import store from "misago/services/store"
65

76
const AUTH_SYNC_RATE = 45 // sync user with backend every 45 seconds
87

98
export default function initializer(context) {
109
if (context.get("isAuthenticated")) {
1110
window.setInterval(function () {
12-
ajax.get(context.get("AUTH_API")).then(
13-
function (data) {
14-
store.dispatch(patch(data))
15-
},
16-
function (rejection) {
17-
snackbar.apiError(rejection)
18-
}
19-
)
11+
ajax.get(context.get("AUTH_API")).then(function (data) {
12+
store.dispatch(patch(data))
13+
})
2014
}, AUTH_SYNC_RATE * 1000)
2115
}
2216
}

misago/static/misago/js/misago.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

misago/static/misago/js/misago.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)