aboutsummaryrefslogtreecommitdiff
path: root/Backend/Api/Api/Controllers/UserController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Backend/Api/Api/Controllers/UserController.cs')
-rw-r--r--Backend/Api/Api/Controllers/UserController.cs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Backend/Api/Api/Controllers/UserController.cs b/Backend/Api/Api/Controllers/UserController.cs
index 4e0f0a3..965ad6b 100644
--- a/Backend/Api/Api/Controllers/UserController.cs
+++ b/Backend/Api/Api/Controllers/UserController.cs
@@ -17,13 +17,9 @@ namespace Api.Controllers
}
[HttpPost("profile/pfp")]
[Authorize(Roles = "User")]
- public async Task<ActionResult<User>> setPfp([FromBody] IFormFile image)
+ public async Task<ActionResult<User>> setPfp(IFormFile image)
{
- if (image == null)
- return BadRequest();
var id = await _userService.UserIdFromJwt();
- if (id == null)
- return Unauthorized();
if(await _userService.AddOrChangePfp(id,image))
return Ok();
return BadRequest();