浏览代码

fix: formatting

Alexandru Cambose 3 月之前
父节点
当前提交
4eebd96814
共有 2 个文件被更改,包括 6 次插入7 次删除
  1. 1 4
      apps/insights/src/server/pyth.ts
  2. 5 3
      apps/insights/src/utils/get-host.ts

+ 1 - 4
apps/insights/src/server/pyth.ts

@@ -48,10 +48,7 @@ export async function getFeedsForPublisherRequest(
 }
 
 export const getFeedsRequest = async (cluster: Cluster) => {
-  const url = new URL(
-    `/api/pyth/get-feeds`,
-    await getHost(),
-  );
+  const url = new URL(`/api/pyth/get-feeds`, await getHost());
   url.searchParams.set("cluster", ClusterToName[cluster]);
   url.searchParams.set("excludePriceComponents", "true");
 

+ 5 - 3
apps/insights/src/utils/get-host.ts

@@ -18,11 +18,13 @@ export const getHost = async () => {
 
     return `${proto}://${host}`;
   }
-}
+};
 
 class NoHostError extends Error {
   constructor() {
-    super("Request had neither an `x-forwarded-host` header nor a `host` header");
+    super(
+      "Request had neither an `x-forwarded-host` header nor a `host` header",
+    );
     this.name = "NoHostError";
   }
-}
+}