feat: Añadir configuración de Nginx para el API de LMS y ajustar las rutas en el frontend de OpenCCB
This commit is contained in:
@@ -20,7 +20,7 @@ export default function AdminLayout({ children }: { children: React.ReactNode })
|
||||
|
||||
const menuItems = [
|
||||
{ icon: LayoutDashboard, label: "Dashboard", href: "/admin" },
|
||||
{ icon: Building2, label: "Organizations", href: "/admin/organizations" },
|
||||
{ icon: Building2, label: "Organizations", href: "/admin" },
|
||||
{ icon: Users, label: "Users", href: "/admin/users" },
|
||||
{ icon: Mic, label: "Audio Evaluations", href: "/admin/audio-evaluations" },
|
||||
{ icon: ClipboardList, label: "Audit Logs", href: "/admin/audit" },
|
||||
|
||||
@@ -10,7 +10,7 @@ export default function AuthHeader() {
|
||||
<div className="flex items-center gap-4">
|
||||
{user?.role === 'admin' && (
|
||||
<>
|
||||
<Link href="/admin/organizations" className="text-xs font-bold uppercase tracking-widest text-gray-400 hover:text-white transition-colors flex items-center gap-2" title="Organizations">
|
||||
<Link href="/admin" className="text-xs font-bold uppercase tracking-widest text-gray-400 hover:text-white transition-colors flex items-center gap-2" title="Organizations">
|
||||
<Building2 size={16} /> <span className="hidden md:inline">Org</span>
|
||||
</Link>
|
||||
<Link href="/admin/audit" className="text-xs font-bold uppercase tracking-widest text-gray-400 hover:text-white transition-colors flex items-center gap-2" title="Audit Logs">
|
||||
|
||||
@@ -26,7 +26,14 @@ const getApiBaseUrl = (defaultPort: string, envVar?: string) => {
|
||||
};
|
||||
|
||||
export const API_BASE_URL = getApiBaseUrl("3001", process.env.NEXT_PUBLIC_CMS_API_URL);
|
||||
export const LMS_API_BASE_URL = getApiBaseUrl("3002", process.env.NEXT_PUBLIC_LMS_API_URL);
|
||||
const getLmsBaseUrl = (envVar?: string) => {
|
||||
if (typeof window !== 'undefined' && window.location.hostname === 'studio.norteamericano.com') {
|
||||
return `${window.location.protocol}//studio.norteamericano.com/lms-api`;
|
||||
}
|
||||
return getApiBaseUrl("3002", envVar);
|
||||
};
|
||||
|
||||
export const LMS_API_BASE_URL = getLmsBaseUrl(process.env.NEXT_PUBLIC_LMS_API_URL);
|
||||
|
||||
// Polyfill for crypto.randomUUID() for non-HTTPS contexts
|
||||
export function generateUUID(): string {
|
||||
|
||||
Reference in New Issue
Block a user