api: Mahlzeiten GET/POST + checkedIn/checkedOut (X-Api-Token)

This commit is contained in:
2026-09-25 19:06:08 +02:00
parent ac4a2af7cb
commit 9c148a1242
4 changed files with 143 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# yaml-language-server: $schema=https://symfony.com/schema/config/routing/routing.yaml
# Stateless-JSON-API für HA & Co. (Auth: X-Api-Token, s. ApiTokenSubscriber)
api_mahlzeiten_liste:
path: /api/mahlzeiten
controller: App\UI\Http\Api\MahlzeitApiController::index
methods: [GET]
api_mahlzeiten_create:
path: /api/mahlzeiten
controller: App\UI\Http\Api\MahlzeitApiController::create
methods: [POST]
api_mahlzeiten_checkoff:
path: /api/mahlzeiten/{id}/checkoff
controller: App\UI\Http\Api\MahlzeitApiController::checkoff
methods: [POST]
requirements:
id: \d+
api_mahlzeiten_uncheck:
path: /api/mahlzeiten/{id}/uncheck
controller: App\UI\Http\Api\MahlzeitApiController::uncheck
methods: [POST]
requirements:
id: \d+