This commit is contained in:
Flam3rboy committed 2021-08-27 11:10:42 +02:00
1 parent db3f5c0d1b
commit 2dbbd21f73
17 files changed
+97 -127

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ export async function createChannel(
recipient_ids: null
}).save();
await emitEvent({ event: "CHANNEL_CREATE", data: channel), guild_id: channel.guild_id } as ChannelCreateEvent;
await emitEvent({ event: "CHANNEL_CREATE", data: channel, guild_id: channel.guild_id } as ChannelCreateEvent);
return channel;
}
-16
View File
@@ -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;
}