summary refs log tree commit diff
path: root/api/src/util/User.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-01 10:47:00 +0200
committerGitHub <noreply@github.com>2021-09-01 10:47:00 +0200
commitdf1d633c4b56bea97e0b76da34171d80c0c6a3ff (patch)
tree7e57837ec000a641935a32649ac17b38ef2e29d8 /api/src/util/User.ts
parentMerge pull request #287 from EMREOYUN/patch-1 (diff)
parentMerge pull request #299 from AlTech98/typeorm (diff)
downloadserver-df1d633c4b56bea97e0b76da34171d80c0c6a3ff.tar.xz
Merge pull request #300 from fosscord/typeorm
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 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); -}