misc: addressed greptile comments 1

This commit is contained in:
Sheen Capadngan
2025-09-03 21:18:34 +08:00
parent e30cb9d767
commit ec39f84719
7 changed files with 33 additions and 12 deletions
+4 -2
View File
@@ -12,8 +12,10 @@ export const gatewaysQueryKeys = {
queryOptions({
queryKey: gatewaysQueryKeys.listKey(),
queryFn: async () => {
const { data } = await apiRequest.get<{ gateways: TGateway[] }>("/api/v1/gateways");
const { data: dataV2 } = await apiRequest.get<TGatewayV2[]>("/api/v2/gateways");
const [{ data }, { data: dataV2 }] = await Promise.all([
apiRequest.get<{ gateways: TGateway[] }>("/api/v1/gateways"),
apiRequest.get<TGatewayV2[]>("/api/v2/gateways")
]);
return [
...data.gateways.map((g) => ({