don't proxy requests that happen on the server
This commit is contained in:
parent
a6576e9730
commit
238ec6e254
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
import ky from "ky";
|
import ky from "ky";
|
||||||
|
import { isServer } from "../utils/utils";
|
||||||
|
|
||||||
export default class Service {
|
export default class Service {
|
||||||
/**
|
/**
|
||||||
@ -38,7 +39,7 @@ export default class Service {
|
|||||||
*/
|
*/
|
||||||
public async fetch<T>(url: string): Promise<T | undefined> {
|
public async fetch<T>(url: string): Promise<T | undefined> {
|
||||||
try {
|
try {
|
||||||
return await ky.get<T>(this.buildRequestUrl(true, url)).json();
|
return await ky.get<T>(this.buildRequestUrl(!isServer(), url)).json();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { FaSteam } from "react-icons/fa";
|
import { FaSteam } from "react-icons/fa";
|
||||||
import Tooltip from "@/components/tooltip";
|
import Tooltip from "@/components/tooltip";
|
||||||
import ScoreSaberPlayer from "@ssr/common/player/impl/scoresaber-player";
|
import ScoreSaberPlayer from "@ssr/common/player/impl/scoresaber-player";
|
||||||
|
Reference in New Issue
Block a user