HACKHACK: Migrate to typeorm v1.0.0, still work to do in actually updating all the queries properly

This commit is contained in:
Rory&
2026-06-13 01:10:59 +02:00
parent 8da172d2ad
commit 92f25c3a22
27 changed files with 108 additions and 55 deletions
+1 -1
View File
@@ -546,7 +546,7 @@ export class Channel extends BaseClass {
channel_id: channel.id,
user: await User.findOneOrFail({
where: { id: user_id },
select: PublicUserProjection,
select: Object.fromEntries(PublicUserProjection.map((i) => [i, true])), //TODO: cleanup
}),
},
channel_id: channel.id,
+1 -1
View File
@@ -335,7 +335,7 @@ export class Member extends BaseClassWithoutId {
where: {
id: guild_id,
},
relations: PublicGuildRelations,
relations: Object.fromEntries(PublicGuildRelations.map((i) => [i, true])), //TODO: clean up
relationLoadStrategy: "query",
});
const channelPositionsGuild = await Guild.findOneOrFail({
+1 -1
View File
@@ -235,7 +235,7 @@ export class User extends BaseClass {
static async getPublicUser(user_id: string): Promise<PublicUser> {
const user = await User.findOneOrFail({
where: { id: user_id },
select: PublicUserProjection,
select: Object.fromEntries(PublicUserProjection.map((i) => [i, true])), // TODO: clean up
});
return user.toPublicUser();
}