diff --git a/Controllers/ProfileController.cs b/Controllers/ProfileController.cs index b5ddf13980d5034bb5922e1bcf8e33b568896f65..52f0f2fac963cf13ead452cc691a07a8e43f355b 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