Fix typeorm queries no longer allowing empty where clauses
This commit is contained in:
parent
fca7953a51
commit
3e549dae28
@ -34,5 +34,5 @@ export async function initInstance() {
|
||||
// }
|
||||
|
||||
// TODO: do no clear sessions for instance cluster
|
||||
await Session.delete({});
|
||||
await Session.clear();
|
||||
}
|
||||
|
||||
@ -49,15 +49,18 @@ export function generateStreamKey(
|
||||
// TODO: remove this when Server.stop() is fixed so that it waits for all websocket connections to run their
|
||||
// respective Close event listener function for session cleanup
|
||||
export async function cleanupOnStartup(): Promise<void> {
|
||||
await VoiceState.update(
|
||||
{},
|
||||
{
|
||||
// @ts-expect-error channel_id is nullable
|
||||
channel_id: null,
|
||||
// @ts-expect-error guild_id is nullable
|
||||
guild_id: null,
|
||||
self_stream: false,
|
||||
self_video: false,
|
||||
},
|
||||
);
|
||||
// TODO: how is this different from clearing the table?
|
||||
//await VoiceState.update(
|
||||
// {},
|
||||
// {
|
||||
// // @ts-expect-error channel_id is nullable
|
||||
// channel_id: null,
|
||||
// // @ts-expect-error guild_id is nullable
|
||||
// guild_id: null,
|
||||
// self_stream: false,
|
||||
// self_video: false,
|
||||
// },
|
||||
//);
|
||||
|
||||
await VoiceState.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user