Skip to content
Snippets Groups Projects
Commit 4a40e111 authored by MikelLiza's avatar MikelLiza
Browse files

Third Commit

parent a2b58a05
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment