diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-13 23:06:18 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-13 23:06:18 +0200 |
| commit | 61c51944844ed404cd4f174440d6e81b2a8591ba (patch) | |
| tree | 52384addf959a81d63d91702399f47e07bf02ded /src/DevHive.Web/Controllers/PostController.cs | |
| parent | 623bb66183be1349325ca9364f5bbf2e451f7578 (diff) | |
| download | DevHive-61c51944844ed404cd4f174440d6e81b2a8591ba.tar DevHive-61c51944844ed404cd4f174440d6e81b2a8591ba.tar.gz DevHive-61c51944844ed404cd4f174440d6e81b2a8591ba.zip | |
Fixed sln-wide code formatting
Diffstat (limited to 'src/DevHive.Web/Controllers/PostController.cs')
| -rw-r--r-- | src/DevHive.Web/Controllers/PostController.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/DevHive.Web/Controllers/PostController.cs b/src/DevHive.Web/Controllers/PostController.cs index 753897c..a906e47 100644 --- a/src/DevHive.Web/Controllers/PostController.cs +++ b/src/DevHive.Web/Controllers/PostController.cs @@ -30,9 +30,9 @@ namespace DevHive.Web.Controllers [HttpPost] public async Task<IActionResult> Create([FromBody] CreatePostWebModel createPostModel) { - CreatePostServiceModel postServiceModel = - this._postMapper.Map<CreatePostServiceModel>(createPostModel); - + CreatePostServiceModel postServiceModel = + this._postMapper.Map<CreatePostServiceModel>(createPostModel); + bool result = await this._postService.CreatePost(postServiceModel); if (!result) @@ -49,7 +49,7 @@ namespace DevHive.Web.Controllers bool result = await this._postService.AddComment(createCommentServiceModel); - if(!result) + if (!result) return new BadRequestObjectResult("Could not create the Comment"); return new OkResult(); @@ -81,7 +81,7 @@ namespace DevHive.Web.Controllers [HttpPut] public async Task<IActionResult> Update(Guid id, [FromBody] UpdatePostWebModel updatePostModel) { - UpdatePostServiceModel postServiceModel = + UpdatePostServiceModel postServiceModel = this._postMapper.Map<UpdatePostServiceModel>(updatePostModel); postServiceModel.IssuerId = id; @@ -129,7 +129,7 @@ namespace DevHive.Web.Controllers { if (!await this._postService.ValidateJwtForComment(id, authorization)) return new UnauthorizedResult(); - + bool result = await this._postService.DeleteComment(id); if (!result) |
