only fetch privileged resources when appropriate
ci/woodpecker/pr/woodpecker Pipeline was successful
Details
ci/woodpecker/pr/woodpecker Pipeline was successful
Details
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
|
@ -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 New Issue