mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-16 18:06:39 +00:00
✨ blueprint details page
This commit is contained in:
12
src/lib/api/getCachedOrg.ts
Normal file
12
src/lib/api/getCachedOrg.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { GetOrgResponse } from "@server/routers/org";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import { cache } from "react";
|
||||
import { authCookieHeader } from "./cookies";
|
||||
import { internal } from ".";
|
||||
|
||||
export const getCachedOrg = cache(async (orgId: string) =>
|
||||
internal.get<AxiosResponse<GetOrgResponse>>(
|
||||
`/org/${orgId}`,
|
||||
await authCookieHeader()
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user