Exemplo n.º 1
0
        public IHttpActionResult DeleteBlockDetails(RequestModel model)
        {
            ReturnMsg obj = new ReturnMsg();

            try
            {
                if (string.IsNullOrEmpty(model.Id) || (string.IsNullOrEmpty(model.ScheduleId)))
                {
                    return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Blocking User Id and Blocked User Id are required.")));
                }

                long blockingUserId = Convert.ToInt64(model.Id);
                long blockedUserId  = Convert.ToInt64(model.ScheduleId);
                obj = _blockservice.DeleteBlockDetails(blockingUserId, blockedUserId);
            }
            catch (Exception e)
            {
                return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, e.Message)));
            }

            return(Ok(obj));
        }