Пример #1
0
        public async Task <ApiResponse> AddClientPromotion([FromBody] ClientPromotionRequest request)
        {
            var apiResp = new ApiResponse {
                ResponseType = -1, ResponseMessage = "Failed"
            };
            var retVal = await _promotion.AddClientPromotion(request.PromotionMapId, request.PromotionCategoryId, request.PromotionTypeId, request.ClientId, request.Enabled);

            if (retVal.Success.HasValue)
            {
                apiResp.ResponseType    = Convert.ToInt16(retVal.Success);
                apiResp.ResponseMessage = retVal.Message;
            }
            return(apiResp);
        }