Add dedicated local admin domain routing
This commit is contained in:
@@ -5,6 +5,7 @@ import { AdminDashboardShell } from "@/components/admin/admin-dashboard-shell";
|
||||
import { SMTPSettingsForm } from "@/components/admin/smtp-settings-form";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth";
|
||||
import { getAdminAppPath } from "@/lib/admin-routing";
|
||||
import { getMailSettingsFormValues } from "@/lib/app-config";
|
||||
|
||||
import { saveMailSettingsAction, sendTestEmailAction } from "./actions";
|
||||
@@ -28,14 +29,14 @@ const copy = {
|
||||
|
||||
export default async function AdminSMTPPage() {
|
||||
if (!(await isAdminAuthenticated())) {
|
||||
redirect("/");
|
||||
redirect(getAdminAppPath("/"));
|
||||
}
|
||||
|
||||
async function logoutAction() {
|
||||
"use server";
|
||||
|
||||
await clearAdminSessionCookie();
|
||||
redirect("/");
|
||||
redirect(getAdminAppPath("/"));
|
||||
}
|
||||
|
||||
const mailSettings = await getMailSettingsFormValues();
|
||||
|
||||
Reference in New Issue
Block a user