mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
13 lines
386 B
TypeScript
13 lines
386 B
TypeScript
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()
|
|
)
|
|
);
|