- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim) - AdonisJS v7 app with Inertia.js + Vue 3 - MongoDB integration - CWMP/TR-069 state machine engine - Configuration engine with compliance tracking - Branding: ADAM ACS (favicon, navbar, locales) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
18 lines
489 B
TypeScript
18 lines
489 B
TypeScript
import BaseInertiaMiddleware from '@adonisjs/inertia/inertia_middleware'
|
|
import type { HttpContext } from '@adonisjs/core/http'
|
|
import type { NextFn } from '@adonisjs/core/types/http'
|
|
|
|
export default class InertiaMiddleware extends BaseInertiaMiddleware {
|
|
async share(ctx: HttpContext) {
|
|
return {
|
|
errors: ctx.session?.flashMessages.get('errors'),
|
|
}
|
|
}
|
|
|
|
async handle(ctx: HttpContext, next: NextFn) {
|
|
await this.init(ctx)
|
|
await next()
|
|
this.dispose(ctx)
|
|
}
|
|
}
|