favorite-api.js 536 Bytes
/**
 * 收藏相关接口
 * @author: yyq<yanqing.yang@yoho.cn>
 * @date: 2016/7/17
 */

'use strict';

const api = global.yoho.API;

const addFavAsync = (uid, id, type) => {
    return api.get('', {
        method: 'app.favorite.add',
        id: id,
        uid: uid,
        type: type
    });
};

const cancelFavAsync = (uid, id, type) => {
    return api.get('', {
        method: 'app.favorite.cancel',
        fav_id: id,
        uid: uid,
        type: type
    });
};

module.exports = {
    addFavAsync,
    cancelFavAsync
};