Some checks failed
CD / Build and push images (push) Successful in 3m50s
CD / Deploy to Test (push) Successful in 10s
CI / Lint, typecheck, test (push) Successful in 4m13s
CI / Build container images (push) Has been skipped
CD / Smoke tests against Test (push) Successful in 1m14s
CD / Promote to Int (push) Successful in 11s
CI / Auth e2e pack (push) Failing after 2m44s
CI / Import/export fidelity gate (push) Has been skipped
The public home page (/) now renders Markdown the Site Admin stores in the new home.content instance setting, through the same sanitizing pipeline as the legal pages; empty falls back to the built-in welcome text. New public GET /home/content, an Admin → Settings editor with live preview, and an e2e test covering default/configured/escaping/ admin-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1
23 lines
680 B
TypeScript
23 lines
680 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { HomeContentView } from '@dorfteich/shared';
|
|
|
|
import { Public } from '../auth/auth.guard';
|
|
import { HomeService } from './home.service';
|
|
|
|
/**
|
|
* Public landing-page content (the editable home page). `@Public()` — the
|
|
* home page is reachable without a session. The Site Admin edits the
|
|
* underlying `home.content` setting through Admin → Settings (PATCH
|
|
* /admin/settings), same as the legal texts.
|
|
*/
|
|
@Controller('home')
|
|
export class HomeController {
|
|
constructor(private readonly home: HomeService) {}
|
|
|
|
@Get('content')
|
|
@Public()
|
|
content(): Promise<HomeContentView> {
|
|
return this.home.content();
|
|
}
|
|
}
|