diff options
| author | Danail Dimitrov <danaildimitrov321@gmail.com> | 2021-03-03 10:27:26 +0200 |
|---|---|---|
| committer | Danail Dimitrov <danaildimitrov321@gmail.com> | 2021-03-03 10:27:26 +0200 |
| commit | f986ca67edd425c32eaec5a20fecdc5786f9d8e3 (patch) | |
| tree | 1d63feb6622257735a4a5e878ba9e7fd1cafbfc7 /src/Web/DevHive.Web/Controllers | |
| parent | 804d274223734ea1c67920622ceb453cca602fc9 (diff) | |
| download | DevHive-f986ca67edd425c32eaec5a20fecdc5786f9d8e3.tar DevHive-f986ca67edd425c32eaec5a20fecdc5786f9d8e3.tar.gz DevHive-f986ca67edd425c32eaec5a20fecdc5786f9d8e3.zip | |
Fixing bugs in rating layer
Diffstat (limited to 'src/Web/DevHive.Web/Controllers')
| -rw-r--r-- | src/Web/DevHive.Web/Controllers/RatingController.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Web/DevHive.Web/Controllers/RatingController.cs b/src/Web/DevHive.Web/Controllers/RatingController.cs index 5716b85..8d3ac92 100644 --- a/src/Web/DevHive.Web/Controllers/RatingController.cs +++ b/src/Web/DevHive.Web/Controllers/RatingController.cs @@ -65,7 +65,7 @@ namespace DevHive.Web.Controllers } [HttpPut] - public async Task<IActionResult> UpdateRating(Guid userId, [FromBody] UpdateRatingWebModel updateRatingWebModel, [FromHeader] string authorization) + public async Task<IActionResult> UpdateRating(Guid userId, Guid postId, [FromBody] UpdateRatingWebModel updateRatingWebModel, [FromHeader] string authorization) { if (!this._jwtService.ValidateToken(userId, authorization)) return new UnauthorizedResult(); @@ -73,6 +73,7 @@ namespace DevHive.Web.Controllers UpdateRatingServiceModel updateRatingServiceModel = this._mapper.Map<UpdateRatingServiceModel>(updateRatingWebModel); updateRatingServiceModel.UserId = userId; + updateRatingServiceModel.PostId = postId; ReadRatingServiceModel readRatingServiceModel = await this._rateService.UpdateRating(updateRatingServiceModel); |
