From 266ce94b38c0ac4765d890b876359e15f062955d Mon Sep 17 00:00:00 2001
From: MikelLiza <74621817+MikelLiza@users.noreply.github.com>
Date: Sun, 9 Apr 2023 17:37:44 +0100
Subject: [PATCH] Third Commit

---
 Controllers/ProfileController.cs | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Controllers/ProfileController.cs b/Controllers/ProfileController.cs
index b5ddf13..52f0f2f 100644
--- a/Controllers/ProfileController.cs
+++ b/Controllers/ProfileController.cs
@@ -22,18 +22,19 @@ public class ProfileController : DefaultProfileController
 
     [HttpPost("UpdateProfile")]
     [SwaggerResponse(204)]
-    [SwaggerResponse(400, Type = typeof(ResponseEnvelope<BadRequestObjectResult>))]
-    public async Task<ActionResult> UpdateProfile([FromBody] ProfileDTO profile)
+    [SwaggerResponse(400, Type = typeof(ResponseEnvelope<ProfileDTO>))]
+    public async Task<ActionResult<ResponseEnvelope<ProfileDTO>>> UpdateProfile([FromBody] ProfileDTO profile)
     {
         try
         {
             await _profileService.CreateOrUpdateProfile(profile, UserId);
+                    
+            return Ok(profile);
         }
-        catch (Exception Ex)
+        catch (Exception ex)
         {
-            return Unauthorized(Ex.Message);
+            return Unauthorized(ex.Message);
         }
 
-        return Ok(null);
     }
 }
\ No newline at end of file
-- 
GitLab