Example #1
0
        public async Task <object> Put(int id, [FromBody] ExchangeLikeViewModel model)
        {
            MessageBase2 result = new MessageBase2();

            await _exchangeService.LikeAsync(id, model.UserId);

            return(result);
        }
Example #2
0
        public async Task <object> Put(int id, [FromBody] ExchangeLikeViewModel model)
        {
            MessageBase2 result = new MessageBase2();

            if (!await this._cooperationService.LikeAsync(id, model.UserId))
            {
                result.Success  = Permanent.FAILED;
                result.Error    = (int)StatusCodeEnum.FORBIDDEN;
                result.ErrorMsg = "已到达参与上线";
            }

            return(result);
        }