Skip to content

Commit

Permalink
return product stock as int
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Elsbrock committed Sep 25, 2011
1 parent 7fe8c54 commit 92c71e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Cashpoint/API/Products.pm
Expand Up @@ -11,6 +11,7 @@ use Dancer::Plugin::DBIC;
use Scalar::Util::Numeric qw/isnum/;
use Log::Log4perl qw( :easy );

use Cashpoint::Utils qw/validate_ean/;
use Cashpoint::AccessGuard;
use Cashpoint::ProductGuard;

Expand All @@ -22,7 +23,7 @@ get '/products' => protected sub {
push @data, {
name => $p->name,
ean => $p->ean,
stock => $p->stock,
stock => int($p->stock),
added_on => $p->added_on->datetime,
};
}
Expand Down

0 comments on commit 92c71e2

Please sign in to comment.