summary refs log tree commit diff
path: root/src/api/routes/users/@me/disable.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/users/@me/disable.ts')
-rw-r--r--src/api/routes/users/@me/disable.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/api/routes/users/@me/disable.ts b/src/api/routes/users/@me/disable.ts
index 4aff3774..477d433c 100644
--- a/src/api/routes/users/@me/disable.ts
+++ b/src/api/routes/users/@me/disable.ts
@@ -1,7 +1,13 @@
 import { User } from "@fosscord/util";
-import { Router, Response, Request } from "express";
-import { route } from "@fosscord/api";
-import bcrypt from "bcrypt";
+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();