From 0ecc5d8c0e353676e9f5bdbc724bb33572d3b572 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 27 Aug 2021 11:10:42 +0200 Subject: :construction: api --- api/src/util/User.ts | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 api/src/util/User.ts (limited to 'api/src/util/User.ts') 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; -} -- cgit 1.5.1