mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-20 23:33:50 +02:00
refactor queryRequest
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
import DeprecationAlert from '@/components/DeprecationAlert.vue';
|
||||
|
||||
import { useFavoriteStore, useUserStore, useWorldStore } from '../../../stores';
|
||||
import { favoriteRequest } from '../../../api';
|
||||
import { queryRequest } from '../../../api';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
favoriteWorldsTab.value = '0';
|
||||
userDialog.value.userFavoriteWorlds = [];
|
||||
const worldLists = [];
|
||||
const groupArgs = await favoriteRequest.getCachedFavoriteGroups({
|
||||
const groupArgs = await queryRequest.fetch('favoriteGroups', {
|
||||
ownerId: userId,
|
||||
n: 100,
|
||||
offset: 0
|
||||
@@ -145,7 +145,7 @@
|
||||
tag: list.name
|
||||
};
|
||||
try {
|
||||
const args = await favoriteRequest.getCachedFavoriteWorlds(params);
|
||||
const args = await queryRequest.fetch('favoriteWorlds', params);
|
||||
handleFavoriteWorldList(args);
|
||||
return [list.displayName, list.visibility, args.json];
|
||||
} catch (err) {
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
|
||||
import { useUserStore, useWorldStore } from '../../../stores';
|
||||
import { userDialogWorldOrderOptions, userDialogWorldSortingOptions } from '../../../shared/constants/';
|
||||
import { queryRequest } from '../../../api';
|
||||
import { useOptionKeySelect } from '../../../composables/useOptionKeySelect';
|
||||
import { worldRequest } from '../../../api';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
try {
|
||||
let offset = 0;
|
||||
while (true) {
|
||||
const args = await worldRequest.getCachedWorlds({
|
||||
const args = await queryRequest.fetch('worldsByUser', {
|
||||
...params,
|
||||
offset
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
miscRequest,
|
||||
notificationRequest,
|
||||
playerModerationRequest,
|
||||
worldRequest
|
||||
queryRequest
|
||||
} from '../../../api';
|
||||
import { copyToClipboard, parseLocation } from '../../../shared/utils';
|
||||
import { database } from '../../../service/database';
|
||||
@@ -259,8 +259,8 @@ export function useUserDialogCommands(
|
||||
},
|
||||
'Invite Message': () => {
|
||||
const L = parseLocation(lastLocation.value.location);
|
||||
worldRequest
|
||||
.getCachedWorld({
|
||||
queryRequest
|
||||
.fetch('world', {
|
||||
worldId: L.worldId
|
||||
})
|
||||
.then((args) => {
|
||||
@@ -288,8 +288,8 @@ export function useUserDialogCommands(
|
||||
currentLocation = lastLocationDestination.value;
|
||||
}
|
||||
const L = parseLocation(currentLocation);
|
||||
worldRequest
|
||||
.getCachedWorld({
|
||||
queryRequest
|
||||
.fetch('world', {
|
||||
worldId: L.worldId
|
||||
})
|
||||
.then((args) => {
|
||||
|
||||
Reference in New Issue
Block a user