mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 08:13:52 +02:00
refactor queryRequest
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { groupRequest } from '../../api';
|
||||
import { parseLocation } from './location';
|
||||
import { queryRequest } from '../../api';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -59,7 +59,7 @@ async function getGroupName(data) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
const args = await groupRequest.getCachedGroup({
|
||||
const args = await queryRequest.fetch('group', {
|
||||
groupId
|
||||
});
|
||||
groupName = args.ref.name;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { parseLocation } from './location';
|
||||
import { queryRequest } from '../../api';
|
||||
import { rpcWorlds } from '../constants';
|
||||
import { worldRequest } from '../../api';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -13,7 +13,7 @@ async function getWorldName(location) {
|
||||
const L = parseLocation(location);
|
||||
if (L.isRealInstance && L.worldId) {
|
||||
try {
|
||||
const args = await worldRequest.getCachedWorld({
|
||||
const args = await queryRequest.fetch('world', {
|
||||
worldId: L.worldId
|
||||
});
|
||||
worldName = args.ref.name;
|
||||
|
||||
Reference in New Issue
Block a user