From 5e9317def5464801e7f13caaf1b4b42757c7cfc8 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Sat, 30 Aug 2025 08:27:36 +0200 Subject: [PATCH] fix: enable strict parameter checks for /coffee POST endpoint (#51) This will prevent typos from slipping through, which is nice. Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/51 --- api/coffee/POST.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/coffee/POST.php b/api/coffee/POST.php index 29065a1..a7b24d2 100644 --- a/api/coffee/POST.php +++ b/api/coffee/POST.php @@ -13,7 +13,7 @@ final class POST_Coffee extends API { public function __construct() { - parent::__construct(new Ruleset()->POST([ + parent::__construct(new Ruleset(strict: true)->POST([ new Rules(CoffeeTable::DATE_CREATED->value) ->type(Type::STRING) ->type(Type::NUMBER)