'use strict';

const Controller = require('egg').Controller;

class LikeController extends Controller {
    /**
     * 点赞
     */
    async like() {
        const { ctx } = this;
        let inputParams = ctx.params;
        let ret = await ctx.service.house.v2.answerLike.like(Number(inputParams.id));
        ctx.success(ret);
    }


    /**
     * 取消点赞
     */
    async unLike() {
        const { ctx } = this;
        let inputParams = ctx.params;
        let ret = await ctx.service.house.v2.answerLike.unLike(Number(inputParams.id));
        ctx.success(ret);
    }


}

module.exports = LikeController;
