08f1e2b273
* wip * refactor world state * allow resource to be reloaded when the server is updated * fix #9242 * fix event listeners * remove un-needed code * add tests for asyncResourceFactory reloadOnAppVersionChange * fix double cron notifications and party members showing up in the header after a party invitation is accepted * remove console.log * do not send vm info to loggly due to circular dependency + fix typo * fix #12181 * do not load invites multiple times in members modal * add hover to challenge member count * groups: load members only on demand * minor ui fixes * choose class: fix vue duplicate key warning * minor ui fixes * challanges: load members on demand * add loading spinner * change loading mechanism * fix loading gryphon issues * reduce code duplication
15 lines
405 B
JavaScript
15 lines
405 B
JavaScript
import { loadAsyncResource } from '@/libs/asyncResource';
|
|
|
|
export async function getWorldState (store, options = {}) {
|
|
return loadAsyncResource({
|
|
store,
|
|
path: 'worldState',
|
|
url: '/api/v4/world-state',
|
|
deserialize (response) {
|
|
return response.data.data;
|
|
},
|
|
forceLoad: options.forceLoad,
|
|
reloadOnAppVersionChange: true, // reload when the server has been updated
|
|
});
|
|
}
|