summary refs log tree commit diff
path: root/src/api/routes/users/@me/delete.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/users/@me/delete.ts')
-rw-r--r--src/api/routes/users/@me/delete.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/api/routes/users/@me/delete.ts b/src/api/routes/users/@me/delete.ts
index 1d81c2b9..dfc6131b 100644
--- a/src/api/routes/users/@me/delete.ts
+++ b/src/api/routes/users/@me/delete.ts
@@ -1,8 +1,14 @@
-import { Router, Request, Response } from "express";
-import { Guild, Member, User } from "@fosscord/util";
 import { route } from "@fosscord/api";
-import bcrypt from "bcrypt";
-import { HTTPError } from "@fosscord/util";
+import { HTTPError, Member, 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();