mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-13 21:13:40 +02:00
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:
parent
8209ea5ecc
commit
5e9317def5
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue