summary refs log tree commit diff
path: root/api/src/util/User.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/util/User.ts')
-rw-r--r--api/src/util/User.ts16
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 4d9065c4..00000000 --- a/api/src/util/User.ts +++ /dev/null
@@ -1,16 +0,0 @@ -import { toObject, User, PublicUserProjection } from "@fosscord/util"; -import { HTTPError } from "lambert-server"; - -export { PublicUserProjection }; - -export async function getPublicUser(user_id: string, additional_fields?: any) { - const user = await User.findOneOrFail( - { id: user_id }, - { - ...PublicUserProjection, - ...additional_fields - } - ); - if (!user) throw new HTTPError("User not found", 404); - return user; -}