'use strict';

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

class PresellSearchHistoryController extends Controller {

    /**
     * 获取搜索历史
     */
    async getSearchHistory() {
        const { ctx } = this;
        let ret = await ctx.service.cd.presellSearchHistory.getSearchHistory();
        ctx.success(ret);
    }


    /**
     * 清除搜索记录
     */
    async cleanSearchHistory() {
        const { ctx } = this;
        let ret = await ctx.service.cd.presellSearchHistory.cleanSearchHistory();
        ctx.success(ret);
    }

}

module.exports = PresellSearchHistoryController;
