As is, the unsuspend API cannot unsuspend since it's not searching suspended accounts. This should allow the api to function without getting a 404. (#2660)

Co-authored-by: Jason Southwell <jsouthwell@sivv.com>
This commit is contained in:
Jason Southwell
2021-02-07 07:55:00 -06:00
committed by GitHub
parent ab358a10bc
commit 447ed6ce88

View File

@@ -104,7 +104,7 @@ trait ApiUserControllerBase extends ControllerBase {
*/
delete("/api/v3/users/:userName/suspended")(adminOnly {
val userName = params("userName")
getAccountByUserName(userName) match {
getAccountByUserName(userName, true) match {
case Some(targetAccount) =>
updateAccount(targetAccount.copy(isRemoved = false))
NoContent()