move re-key API routes to private api

This commit is contained in:
Pallavi Kumari
2025-11-08 02:43:47 +05:30
parent 8a5f59cb9f
commit b6e98632b5
15 changed files with 75 additions and 41 deletions

View File

@@ -95,7 +95,7 @@ PersistentKeepalive = 5`;
);
}
await api.post(`/site/${site?.siteId}/regenerate-secret`, {
await api.post(`/re-key/${site?.siteId}/regenerate-site-secret`, {
type: "wireguard",
subnet: res.data.data.subnet,
exitNodeId: res.data.data.exitNodeId,
@@ -109,7 +109,7 @@ PersistentKeepalive = 5`;
const data = res.data.data;
setSiteDefaults(data);
await api.post(`/site/${site?.siteId}/regenerate-secret`, {
await api.post(`/re-key/${site?.siteId}/regenerate-site-secret`, {
type: "newt",
newtId: data.newtId,
newtSecret: data.newtSecret

View File

@@ -8,6 +8,7 @@ import { HorizontalTabs } from "@app/components/HorizontalTabs";
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
import SiteInfoCard from "../../../../../components/SiteInfoCard";
import { getTranslations } from "next-intl/server";
import { build } from "@server/build";
interface SettingsLayoutProps {
children: React.ReactNode;
@@ -37,7 +38,7 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
title: t('general'),
href: `/${params.orgId}/settings/sites/${params.niceId}/general`,
},
...(site.type !== 'local'
...(site.type !== 'local' && build === 'enterprise'
? [
{
title: t('credentials'),