From: Damyan Ivanov Date: Sun, 6 Mar 2022 11:33:08 +0000 (+0000) Subject: version is mandatory when updating a list X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=08d96687d7d4b32f34c58d21d8621b3ad6a93e76;p=lsl.git version is mandatory when updating a list --- diff --git a/lib/App/LazyShoppingList/API/v1.pm b/lib/App/LazyShoppingList/API/v1.pm index 185c094..f65fd42 100644 --- a/lib/App/LazyShoppingList/API/v1.pm +++ b/lib/App/LazyShoppingList/API/v1.pm @@ -222,8 +222,8 @@ put '/list/:list_id' => sub { my $req = request_data; - my $name = $req->{name} // ''; - my $version = $req->{version} // -1; + my $name = $req->{name} // ''; + my $version = $req->{version}; length($version) and $version =~ /^\d{1,18}$/ or return invalid_input('bad version');