aboutsummaryrefslogtreecommitdiff
path: root/src/Web/DevHive.Web/Controllers
diff options
context:
space:
mode:
authorDanail Dimitrov <danaildimitrov321@gmail.com>2021-02-26 09:25:24 +0200
committerDanail Dimitrov <danaildimitrov321@gmail.com>2021-02-26 09:25:24 +0200
commit8e0038628e866ac5ce716e7971e150d2a8f23f4c (patch)
tree4f254e27cec831100e479959e58f01ff4ac7045e /src/Web/DevHive.Web/Controllers
parent42f4506395d6b9e7593253856a21b2b536e18df5 (diff)
downloadDevHive-8e0038628e866ac5ce716e7971e150d2a8f23f4c.tar
DevHive-8e0038628e866ac5ce716e7971e150d2a8f23f4c.tar.gz
DevHive-8e0038628e866ac5ce716e7971e150d2a8f23f4c.zip
Added GetById for rating
Diffstat (limited to 'src/Web/DevHive.Web/Controllers')
-rw-r--r--src/Web/DevHive.Web/Controllers/RatingController.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Web/DevHive.Web/Controllers/RatingController.cs b/src/Web/DevHive.Web/Controllers/RatingController.cs
index 673aee1..d2a7801 100644
--- a/src/Web/DevHive.Web/Controllers/RatingController.cs
+++ b/src/Web/DevHive.Web/Controllers/RatingController.cs
@@ -38,5 +38,14 @@ namespace DevHive.Web.Controllers
return new OkObjectResult(id);
}
+
+ [HttpGet]
+ public async Task<IActionResult> GetRatingById(Guid id)
+ {
+ ReadRatingServiceModel readRatingServiceModel = await this._rateService.GetRatingById(id);
+ ReadRatingWebModel readPostRatingWebModel = this._mapper.Map<ReadRatingWebModel>(readRatingServiceModel);
+
+ return new OkObjectResult(readPostRatingWebModel);
+ }
}
}