Skip to content

Commit 9d70c03

Browse files
committed
fix(elysia): add execut
1 parent 83bc37a commit 9d70c03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

frameworks/TypeScript/elysia/src/postgres.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export const findThenRand = (id: number) =>
2424
}) as Promise<World[]>;
2525

2626
export const bulkUpdate = (worlds: World[]) => {
27+
worlds = worlds.toSorted((a, b) => a.id - b.id);
28+
2729
const values = new Array(worlds.length);
2830
for (let i = 0; i < worlds.length; i++)
2931
values[i] = [worlds[i].id, worlds[i].randomNumber];

0 commit comments

Comments
 (0)