feat: update admin routes and cookie paths to use '/lg-admin' prefix
This commit is contained in:
parent
5f1fd8b1a2
commit
3f9bfded80
@ -18,11 +18,11 @@ export const META_TITLE_CONFIG: TMetaTitleConfig = [
|
||||
title: 'Home',
|
||||
},
|
||||
{
|
||||
path: '/admin/auth/login',
|
||||
path: '/lg-admin/auth/login',
|
||||
title: 'Login',
|
||||
},
|
||||
{
|
||||
path: '/admin/auth/register',
|
||||
path: '/lg-admin/auth/register',
|
||||
title: 'Register',
|
||||
},
|
||||
...ADMIN_MENU.flatMap((menu) =>
|
||||
|
||||
@ -25,27 +25,27 @@ export const MENU: TMenu[] = [
|
||||
items: [
|
||||
{
|
||||
title: 'Dashboard',
|
||||
url: '/admin/dashboard',
|
||||
url: '/lg-admin',
|
||||
icon: ChartIcon,
|
||||
},
|
||||
{
|
||||
title: 'User',
|
||||
url: '/admin/dashboard/users',
|
||||
url: '/lg-admin/users',
|
||||
icon: DocumentIcon,
|
||||
},
|
||||
{
|
||||
title: 'Konten',
|
||||
url: '/admin/dashboard/contents',
|
||||
url: '/lg-admin/contents',
|
||||
icon: ChatIcon,
|
||||
},
|
||||
{
|
||||
title: 'Advertisement',
|
||||
url: '/admin/dashboard/advertisements',
|
||||
url: '/lg-admin/advertisements',
|
||||
icon: MedicalNotesIcon,
|
||||
},
|
||||
{
|
||||
title: 'Subscription',
|
||||
url: '/admin/dashboard/subscriptions',
|
||||
url: '/lg-admin/subscriptions',
|
||||
icon: ChartIcon,
|
||||
},
|
||||
],
|
||||
@ -55,17 +55,17 @@ export const MENU: TMenu[] = [
|
||||
items: [
|
||||
{
|
||||
title: 'Data Situs',
|
||||
url: '/admin/dashboard/site-data',
|
||||
url: '/lg-admin/site-data',
|
||||
icon: WalletIcon,
|
||||
},
|
||||
{
|
||||
title: 'Pengaturan',
|
||||
url: '/admin/dashboard/settings',
|
||||
url: '/lg-admin/settings',
|
||||
icon: SettingIcon,
|
||||
},
|
||||
{
|
||||
title: 'Admin',
|
||||
url: '/admin/dashboard/admins',
|
||||
url: '/lg-admin/admins',
|
||||
icon: ProfileIcon,
|
||||
},
|
||||
],
|
||||
|
||||
@ -15,5 +15,5 @@ export const adminTokenCookieConfig = createCookie(ADMIN_COOKIES.token, {
|
||||
sameSite: 'lax',
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
secrets: [process.env.VITE_SALT_KEY || 'default-secret'],
|
||||
path: '/admin',
|
||||
path: '/lg-admin',
|
||||
})
|
||||
|
||||
@ -14,7 +14,7 @@ export const setAdminLogoutHeaders = () => {
|
||||
const responseHeaders = new Headers()
|
||||
responseHeaders.append(
|
||||
'Set-Cookie',
|
||||
`${ADMIN_COOKIES.token}=; Path=/admin; HttpOnly; SameSite=Strict; Max-Age=0`,
|
||||
`${ADMIN_COOKIES.token}=; Path=/lg-admin; HttpOnly; SameSite=Strict; Max-Age=0`,
|
||||
)
|
||||
|
||||
return responseHeaders
|
||||
|
||||
@ -12,7 +12,7 @@ const AuthLayout = () => {
|
||||
<div className="flex min-h-dvh min-w-dvw flex-col items-center justify-center space-y-8">
|
||||
<div className="grid max-w-lg items-center justify-center space-y-7 rounded-[20px] border border-[#E6E6E6] bg-white p-8">
|
||||
<div className="flex flex-col items-center">
|
||||
<Link to="/admin/dashboard">
|
||||
<Link to="/lg-admin">
|
||||
<img
|
||||
src={APP.logo}
|
||||
alt={APP.title}
|
||||
@ -76,7 +76,7 @@ const AuthLayout = () => {
|
||||
<div className="mb-4 flex justify-between">
|
||||
<span className="text-gray-600">Lupa Kata Sandi?</span>
|
||||
<Link
|
||||
to="/admin/auth/reset-password"
|
||||
to="/lg-admin/auth/reset-password"
|
||||
className="font-semibold text-[#2E2F7C]"
|
||||
>
|
||||
Reset Kata Sandi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user