refactor queryRequest

This commit is contained in:
pa
2026-03-09 21:28:45 +09:00
parent c1a35223d4
commit 58b9bdc1c5
60 changed files with 1134 additions and 883 deletions

View File

@@ -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;

View File

@@ -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;