mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-28 16:57:14 +00:00
get resource auth info endpoint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ResourceProvider from "@app/providers/ResourceProvider";
|
||||
import { internal } from "@app/api";
|
||||
import { GetResourceResponse } from "@server/routers/resource";
|
||||
import { GetResourceAuthInfoResponse } from "@server/routers/resource";
|
||||
import { AxiosResponse } from "axios";
|
||||
import { redirect } from "next/navigation";
|
||||
import { authCookieHeader } from "@app/api/cookies";
|
||||
@@ -25,7 +25,7 @@ export default async function ResourceLayout(props: ResourceLayoutProps) {
|
||||
|
||||
let resource = null;
|
||||
try {
|
||||
const res = await internal.get<AxiosResponse<GetResourceResponse>>(
|
||||
const res = await internal.get<AxiosResponse<GetResourceAuthInfoResponse>>(
|
||||
`/resource/${params.resourceId}`,
|
||||
await authCookieHeader()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user