only fetch privileged resources when appropriate
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
always doing these fetches regardless of whether they'll reasonably succeed is silly and causes a bunch of spurious 403's, which end up as noise in the server logs. instead, let's not do that.
This commit is contained in:
parent
14cedc5ed1
commit
7fe848d1b3
1 changed files with 8 additions and 0 deletions
|
@ -399,6 +399,14 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||
])
|
||||
|
||||
// Start fetching things that don't need to block the UI
|
||||
const currentUser = store.state.users.currentUser
|
||||
if (currentUser) {
|
||||
store.dispatch('fetchMutes')
|
||||
store.dispatch('startFetchingAnnouncements')
|
||||
if (currentUser.role === 'admin' || currentUser.role === 'moderator') {
|
||||
store.dispatch('startFetchingReports')
|
||||
}
|
||||
}
|
||||
getTOS({ store })
|
||||
getStickers({ store })
|
||||
|
||||
|
|
Loading…
Reference in a new issue