diff --git a/api-server/product_catalog.js b/api-server/product_catalog.js index 07a922a..029b388 100644 --- a/api-server/product_catalog.js +++ b/api-server/product_catalog.js @@ -17,8 +17,8 @@ module.exports = function product_catalog( options ) { if( product ) { product.star = Math.max(0,( - (product.star||0) + - ((args.star||true) ? +1 : -1 ))) + (product.star || 0) + + ((args.star && true) ? +1 : -1 ))) product.save$(function(err,product){ if(err) return done(err);