public async Task <ActionResult> AddFeedback(FeedBack feedBack) { feedBack.WrittenBy = User.FindFirstValue(ClaimTypes.Name); await _feedbackService.AddFeedBack(feedBack); return(Ok()); }
public ActionResult AddFeedback( [FromQuery] int bookingId, [FromQuery] float rate, [FromQuery] string comment) { bool rs = _feedbackService.AddFeedBack(bookingId, rate, comment); if (!rs) { return(new JsonResult("Something went wrong") { StatusCode = StatusCodes.Status404NotFound }); } return(new JsonResult("") { StatusCode = StatusCodes.Status200OK }); }