mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-02 09:05:49 +02:00
use fullDomain from resources in get traefik config
This commit is contained in:
parent
92ae69ae29
commit
9320f99920
5 changed files with 143 additions and 136 deletions
|
@ -24,24 +24,24 @@ export default async function RootLayout({
|
|||
}>) {
|
||||
const user = await verifySession();
|
||||
|
||||
console.log("layout.tsx user", user);
|
||||
|
||||
let orgs: ListOrgsResponse["orgs"] = [];
|
||||
if (user) {
|
||||
try {
|
||||
const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
||||
`/orgs`,
|
||||
await authCookieHeader(),
|
||||
);
|
||||
if (res && res.data.data.orgs) {
|
||||
orgs = res.data.data.orgs;
|
||||
}
|
||||
|
||||
if (!orgs.length) {
|
||||
redirect(`/setup`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Error fetching orgs", e);
|
||||
}
|
||||
}
|
||||
// if (user) {
|
||||
// try {
|
||||
// const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
||||
// `/orgs`,
|
||||
// await authCookieHeader()
|
||||
// );
|
||||
// if (res && res.data.data.orgs) {
|
||||
// orgs = res.data.data.orgs;
|
||||
// }
|
||||
// } catch {}
|
||||
|
||||
// if (!orgs.length) {
|
||||
// redirect(`/setup`);
|
||||
// }
|
||||
// }
|
||||
|
||||
return (
|
||||
<html suppressHydrationWarning>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue