summary refs log tree commit diff
path: root/src/api/routes/users/#id/delete.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/users/#id/delete.ts')
-rw-r--r--src/api/routes/users/#id/delete.ts15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/api/routes/users/#id/delete.ts b/src/api/routes/users/#id/delete.ts
index 5b1a682c..b1888d06 100644
--- a/src/api/routes/users/#id/delete.ts
+++ b/src/api/routes/users/#id/delete.ts
@@ -17,13 +17,7 @@
 */
 
 import { route } from "@spacebar/api";
-import {
-	emitEvent,
-	Member,
-	PrivateUserProjection,
-	User,
-	UserDeleteEvent,
-} from "@spacebar/util";
+import { emitEvent, Member, PrivateUserProjection, User, UserDeleteEvent } from "@spacebar/util";
 import { Request, Response, Router } from "express";
 
 const router = Router();
@@ -47,10 +41,7 @@ router.post(
 			where: { id: req.params.id },
 			select: [...PrivateUserProjection, "data"],
 		});
-		await Promise.all([
-			Member.delete({ id: req.params.id }),
-			User.delete({ id: req.params.id }),
-		]);
+		await Promise.all([Member.delete({ id: req.params.id }), User.delete({ id: req.params.id })]);
 
 		// TODO: respect intents as USER_DELETE has potential to cause privacy issues
 		await emitEvent({
@@ -60,7 +51,7 @@ router.post(
 		} as UserDeleteEvent);
 
 		res.sendStatus(204);
-	},
+	}
 );
 
 export default router;