favorite.js
390 Bytes
/**
* 收藏相关接口
* @author: yyq<yanqing.yang@yoho.cn>
* @date: 2016/7/17
*/
'use strict';
const FavAPI = require('./favorite-api');
const toggleFavProduct = (productId, uid, isadd) => {
if (isadd) {
return FavAPI.addFavAsync(uid, productId);
} else {
return FavAPI.cancelFavAsync(uid, productId);
}
};
module.exports = {
toggleFavProduct
};