Пример #1
0
        public ActionResult AddTaxiPrice([FromBody] TaxiPrice taxiPrice)
        {
            var identitiy = HttpContext.User.Identity as ClaimsIdentity;
            var userId    = Convert.ToInt64(identitiy.Name);

            taxiPrice.UserId = userId;
            try{
                return(Ok(_userService.AddTaxiPrice(taxiPrice)));
            }catch (Exception e) {
                return(BadRequest(e.Message));
            }
        }