Files
svc-essensplanung/config/routes.yaml
T

104 lines
2.7 KiB
YAML

# yaml-language-server: $schema=https://symfony.com/schema/config/routing/routing.yaml
home:
path: /
controller: App\UI\Http\HomeController::index
methods: [GET]
login:
path: /login
controller: App\UI\Http\Auth\OidcAuthController::login
methods: [GET]
auth_callback:
path: /auth/callback
controller: App\UI\Http\Auth\OidcAuthController::callback
methods: [GET]
logout:
path: /logout
controller: App\UI\Http\Auth\OidcAuthController::logout
methods: [GET, POST]
# M1: CRUD-Slice "Mahlzeit" (Web-UI, POST/Redirect/Flash)
mahlzeiten_index:
path: /mahlzeiten
controller: App\UI\Http\Essen\MahlzeitController::index
methods: [GET]
# M2: Archiv (gegessene Mahlzeiten)
mahlzeiten_archiv:
path: /mahlzeiten/archiv
controller: App\UI\Http\Essen\MahlzeitController::archiv
methods: [GET]
mahlzeiten_neu:
path: /mahlzeiten/neu
controller: App\UI\Http\Essen\MahlzeitController::neu
methods: [GET]
mahlzeiten_speichern:
path: /mahlzeiten
controller: App\UI\Http\Essen\MahlzeitController::speichern
methods: [POST]
mahlzeiten_bearbeiten:
path: /mahlzeiten/{id}/bearbeiten
controller: App\UI\Http\Essen\MahlzeitController::bearbeiten
methods: [GET]
requirements:
id: \d+
mahlzeiten_aktualisieren:
path: /mahlzeiten/{id}
controller: App\UI\Http\Essen\MahlzeitController::aktualisieren
methods: [POST]
requirements:
id: \d+
mahlzeiten_loeschen:
path: /mahlzeiten/{id}/loeschen
controller: App\UI\Http\Essen\MahlzeitController::loeschen
methods: [POST]
requirements:
id: \d+
# M3: Tagesansicht (alle Mahlzeiten nach Wochentag) + Reorder (Drag & Drop)
mahlzeiten_tage:
path: /mahlzeiten/tage
controller: App\UI\Http\Essen\MahlzeitController::tage
methods: [GET]
mahlzeiten_reorder:
path: /mahlzeiten/reorder
controller: App\UI\Http\Essen\MahlzeitController::reorder
methods: [POST]
# M3: Inspiration (ADR-006): Vorschläge aus dem Archiv + 1-Klick-Adopt
mahlzeiten_inspiration:
path: /inspiration
controller: App\UI\Http\Essen\MahlzeitController::inspiration
methods: [GET]
mahlzeiten_adopt:
path: /mahlzeiten/{id}/adopt
controller: App\UI\Http\Essen\MahlzeitController::adopt
methods: [POST]
requirements:
id: \d+
# M2: Status-Wechsel als htmx-Partial-Endpunkte (Fragment-Antwort)
mahlzeiten_checkoff:
path: /mahlzeiten/{id}/checkoff
controller: App\UI\Http\Essen\MahlzeitController::checkoff
methods: [POST]
requirements:
id: \d+
mahlzeiten_uncheck:
path: /mahlzeiten/{id}/uncheck
controller: App\UI\Http\Essen\MahlzeitController::uncheck
methods: [POST]
requirements:
id: \d+