1 files changed, 0 insertions, 16 deletions
diff --git a/api/src/util/User.ts b/api/src/util/User.ts
deleted file mode 100644
index 392c7101..00000000
--- a/api/src/util/User.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { toObject, UserModel, PublicUserProjection } from "@fosscord/util";
-import { HTTPError } from "lambert-server";
-
-export { PublicUserProjection };
-
-export async function getPublicUser(user_id: string, additional_fields?: any) {
- const user = await UserModel.findOne(
- { id: user_id },
- {
- ...PublicUserProjection,
- ...additional_fields
- }
- ).exec();
- if (!user) throw new HTTPError("User not found", 404);
- return toObject(user);
-}
|