From 447ed6ce8893cf106530b1400928b0f0a2ef80f5 Mon Sep 17 00:00:00 2001 From: Jason Southwell Date: Sun, 7 Feb 2021 07:55:00 -0600 Subject: [PATCH] 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 --- .../gitbucket/core/controller/api/ApiUserControllerBase.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/gitbucket/core/controller/api/ApiUserControllerBase.scala b/src/main/scala/gitbucket/core/controller/api/ApiUserControllerBase.scala index fa908a32d..cbf37be08 100644 --- a/src/main/scala/gitbucket/core/controller/api/ApiUserControllerBase.scala +++ b/src/main/scala/gitbucket/core/controller/api/ApiUserControllerBase.scala @@ -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()