Skip to content

Commit

Permalink
custom get funtion
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeriil committed Dec 14, 2023
1 parent 9dd741a commit 94c0e82
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/nextjs/utils/beat-bridge/customGet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { MySession } from "~~/types/session";

export const customGet = async (url: string, session: MySession | null) => {
const res = await fetch(url, {
headers: {
Authorization: `Bearer ${session?.user.accessToken || ""}`,
},
}).then(res => res.json());

return res;
};

0 comments on commit 94c0e82

Please sign in to comment.