mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 06:16:05 +02:00
refactor: Introduce granular query types with specific policies for improved caching and data freshness.
This commit is contained in:
@@ -363,7 +363,7 @@ export const useGalleryStore = defineStore('Gallery', () => {
|
||||
const print = args.json;
|
||||
const createdAt = getPrintLocalDate(print);
|
||||
try {
|
||||
const owner = await queryRequest.fetch('user', {
|
||||
const owner = await queryRequest.fetch('user.dialog', {
|
||||
userId: print.ownerId
|
||||
});
|
||||
console.log(
|
||||
@@ -558,7 +558,7 @@ export const useGalleryStore = defineStore('Gallery', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const userArgs = await queryRequest.fetch('user', {
|
||||
const userArgs = await queryRequest.fetch('user.dialog', {
|
||||
userId: args.json.holderId
|
||||
});
|
||||
const displayName = userArgs.json?.displayName ?? '';
|
||||
|
||||
+1
-1
@@ -274,7 +274,7 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
|
||||
D.groupRef = {};
|
||||
D.auditLogTypes = [];
|
||||
queryRequest.fetch('group', { groupId }).then((args) => {
|
||||
queryRequest.fetch('group.dialog', { groupId }).then((args) => {
|
||||
D.groupRef = args.ref;
|
||||
if (hasGroupPermission(D.groupRef, 'group-audit-view')) {
|
||||
groupRequest.getGroupAuditLogTypes({ groupId }).then((args) => {
|
||||
|
||||
@@ -245,7 +245,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
emptyDefault: { id: '', displayName: '' },
|
||||
idAlias: 'userId',
|
||||
nameKey: 'displayName',
|
||||
fetchFn: (id) => queryRequest.fetch('user', { userId: id })
|
||||
fetchFn: (id) => queryRequest.fetch('user.dialog', { userId: id })
|
||||
});
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
emptyDefault: { id: '', name: '' },
|
||||
idAlias: 'worldId',
|
||||
nameKey: 'name',
|
||||
fetchFn: (id) => queryRequest.fetch('world', { worldId: id })
|
||||
fetchFn: (id) => queryRequest.fetch('world.location', { worldId: id })
|
||||
});
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
emptyDefault: { id: '', name: '' },
|
||||
idAlias: 'groupId',
|
||||
nameKey: 'name',
|
||||
fetchFn: (id) => queryRequest.fetch('group', { groupId: id })
|
||||
fetchFn: (id) => queryRequest.fetch('group.dialog', { groupId: id })
|
||||
});
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
!worldStore.cachedWorlds.get(location.worldId)?.name
|
||||
) {
|
||||
queryRequest
|
||||
.fetch('world', { worldId: location.worldId })
|
||||
.fetch('world.dialog', { worldId: location.worldId })
|
||||
.then((args) => {
|
||||
uiStore.setDialogCrumbLabel(
|
||||
'previous-instances-info',
|
||||
@@ -467,7 +467,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
});
|
||||
} else {
|
||||
queryRequest
|
||||
.fetch('world', {
|
||||
.fetch('world.location', {
|
||||
worldId: currentInstanceLocation.value.worldId
|
||||
})
|
||||
.then((args) => {
|
||||
@@ -537,7 +537,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
ref.$location = parseLocation(ref.location);
|
||||
if (ref.world?.id) {
|
||||
queryRequest
|
||||
.fetch('world', {
|
||||
.fetch('world.location', {
|
||||
worldId: ref.world.id
|
||||
})
|
||||
.then((args) => {
|
||||
|
||||
@@ -221,7 +221,7 @@ export const useDiscordPresenceSettingsStore = defineStore(
|
||||
groupAccessName: ''
|
||||
};
|
||||
try {
|
||||
const args = await queryRequest.fetch('world', {
|
||||
const args = await queryRequest.fetch('world.location', {
|
||||
worldId: L.worldId
|
||||
});
|
||||
state.lastLocationDetails.worldName = args.ref.name;
|
||||
|
||||
+1
-1
@@ -644,7 +644,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
toast.error('Invalid local favorite world command');
|
||||
break;
|
||||
}
|
||||
queryRequest.fetch('world', { worldId: id }).then(() => {
|
||||
queryRequest.fetch('world.location', { worldId: id }).then(() => {
|
||||
searchStore.directAccessWorld(id);
|
||||
addLocalWorldFavorite(id, group);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user