Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

Fix deleteUserById response message for users without password

daniel31x13811628a952dd
diff --git a/lib/api/controllers/users/userId/deleteUserById.ts b/lib/api/controllers/users/userId/deleteUserById.ts
index 87c09347..fd36ca91 100644
--- a/lib/api/controllers/users/userId/deleteUserById.ts
+++ b/lib/api/controllers/users/userId/deleteUserById.ts
@@ -5,9 +5,6 @@ import Stripe from "stripe";
import { DeleteUserBody } from "@/types/global";
import removeFile from "@/lib/api/storage/removeFile";
-const keycloakEnabled = process.env.KEYCLOAK_CLIENT_SECRET;
-const authentikEnabled = process.env.AUTHENTIK_CLIENT_SECRET;
-
export default async function deleteUserById(
userId: number,
body: DeleteUserBody,
@@ -40,7 +37,8 @@ export default async function deleteUserById(
}
} else {
return {
- response: "Invalid credentials.",
+ response:
+ "User has no password. Please reset your password from the forgot password page.",
status: 401, // Unauthorized
};
}