diff --git a/integraatio/src/test/scala/fi/oph/viestinvalitys/LocalUtil.scala b/integraatio/src/test/scala/fi/oph/viestinvalitys/LocalUtil.scala index 9e64651e..665d038f 100644 --- a/integraatio/src/test/scala/fi/oph/viestinvalitys/LocalUtil.scala +++ b/integraatio/src/test/scala/fi/oph/viestinvalitys/LocalUtil.scala @@ -226,6 +226,9 @@ object LocalUtil { omistaja: String */ //kantaOperaatiot.tallennaViesti() + // viesti lähetystunnuksella + // viesti ilman lähetystunnusta + } } diff --git a/lambdat/raportointi/src/main/scala/fi/oph/viestinvalitys/raportointi/resource/LoginResource.scala b/lambdat/raportointi/src/main/scala/fi/oph/viestinvalitys/raportointi/resource/LoginResource.scala index b486416b..4bbd441b 100644 --- a/lambdat/raportointi/src/main/scala/fi/oph/viestinvalitys/raportointi/resource/LoginResource.scala +++ b/lambdat/raportointi/src/main/scala/fi/oph/viestinvalitys/raportointi/resource/LoginResource.scala @@ -18,6 +18,6 @@ class LoginResource { @GetMapping(path = Array(RaportointiAPIConstants.LOGIN_PATH)) def redirect(response: HttpServletResponse): Unit = { - response.sendRedirect(RaportointiAPIConstants.HEALTHCHECK_PATH) + response.sendRedirect("localhost:3000") } } \ No newline at end of file diff --git a/viestinvalitys-raportointi/middleware.ts b/viestinvalitys-raportointi/middleware.ts deleted file mode 100644 index 4ed3fd75..00000000 --- a/viestinvalitys-raportointi/middleware.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { cookieName, loginUrl } from '@/app/lib/configurations' -import { NextResponse } from 'next/server' -import type { NextRequest } from 'next/server' - -export async function middleware(request: NextRequest) { - console.info('middleware') - const cookie = request.cookies.get(cookieName) - if (cookie === undefined) { - console.info('redirect to login') - return NextResponse.redirect(loginUrl); - } - return NextResponse.next(); // Pass control to the next Middleware or route handler -} - -export const config = { - matcher: [ - /* - * Match all request paths except for the ones starting with: - * - api (API routes) - * - _next/static (static files) - * - _next/image (image optimization files) - * - login redirect - * - favicon.ico (favicon file) - */ - '/((?!api|_next/static|_next/image|login|favicon.ico).*)', - ], -} \ No newline at end of file diff --git a/viestinvalitys-raportointi/src/app/layout.tsx b/viestinvalitys-raportointi/src/app/layout.tsx index 620288b4..cecbf9fd 100644 --- a/viestinvalitys-raportointi/src/app/layout.tsx +++ b/viestinvalitys-raportointi/src/app/layout.tsx @@ -2,6 +2,13 @@ import type { Metadata } from 'next' import { AppRouterCacheProvider } from '@mui/material-nextjs/v13-appRouter'; import './globals.css' import Link from 'next/link'; +import { Roboto } from 'next/font/google' + +const roboto = Roboto({ + weight: ['400', '500'], + display: 'swap', + subsets: ['latin'], +}) export const metadata: Metadata = { title: 'Viestinvälityspalvelun raportointi', @@ -14,7 +21,7 @@ export default function RootLayout({ children: React.ReactNode }) { return ( - +