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
This commit is contained in:
Victor Westerlund 2025-08-30 08:27:36 +02:00
parent 8209ea5ecc
commit 5e9317def5

View file

@ -13,7 +13,7 @@
final class POST_Coffee extends API { final class POST_Coffee extends API {
public function __construct() { public function __construct() {
parent::__construct(new Ruleset()->POST([ parent::__construct(new Ruleset(strict: true)->POST([
new Rules(CoffeeTable::DATE_CREATED->value) new Rules(CoffeeTable::DATE_CREATED->value)
->type(Type::STRING) ->type(Type::STRING)
->type(Type::NUMBER) ->type(Type::NUMBER)