We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83bc37a commit 9d70c03Copy full SHA for 9d70c03
frameworks/TypeScript/elysia/src/postgres.ts
@@ -24,6 +24,8 @@ export const findThenRand = (id: number) =>
24
}) as Promise<World[]>;
25
26
export const bulkUpdate = (worlds: World[]) => {
27
+ worlds = worlds.toSorted((a, b) => a.id - b.id);
28
+
29
const values = new Array(worlds.length);
30
for (let i = 0; i < worlds.length; i++)
31
values[i] = [worlds[i].id, worlds[i].randomNumber];
0 commit comments