summary refs log tree commit diff
path: root/src/api/routes/users/@me/disable.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/api/routes/users/@me/disable.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/api/routes/users/@me/disable.ts b/src/api/routes/users/@me/disable.ts
index 4aff3774..05976908 100644
--- a/src/api/routes/users/@me/disable.ts
+++ b/src/api/routes/users/@me/disable.ts
@@ -1,7 +1,14 @@
-import { User } from "@fosscord/util";
-import { Router, Response, Request } from "express";
 import { route } from "@fosscord/api";
-import bcrypt from "bcrypt";
+import { User } from "@fosscord/util";
+import { Request, Response, Router } from "express";
+
+let bcrypt: any;
+try {
+	bcrypt = require("bcrypt");
+} catch {
+	bcrypt = require("bcryptjs");
+	console.log("Warning: using bcryptjs because bcrypt is not installed! Performance will be affected.");
+}
 
 const router = Router();