aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Web/Controllers')
-rw-r--r--src/DevHive.Web/Controllers/UserController.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DevHive.Web/Controllers/UserController.cs b/src/DevHive.Web/Controllers/UserController.cs
index e409eea..f9fb083 100644
--- a/src/DevHive.Web/Controllers/UserController.cs
+++ b/src/DevHive.Web/Controllers/UserController.cs
@@ -100,7 +100,10 @@ namespace DevHive.Web.Controllers
if (!await this._userService.ValidJWT(id, authorization))
return new UnauthorizedResult();
- await this._userService.DeleteUser(id);
+ bool result = await this._userService.DeleteUser(id);
+ if (!result)
+ return new BadRequestObjectResult("Could not delete User");
+
return new OkResult();
}
#endregion