diff --git a/src/routes/api/v1/bots/[bot_id]/vote/+server.ts b/src/routes/api/v1/bots/[bot_id]/vote/+server.ts index 30e573d..c52d444 100644 --- a/src/routes/api/v1/bots/[bot_id]/vote/+server.ts +++ b/src/routes/api/v1/bots/[bot_id]/vote/+server.ts @@ -29,6 +29,9 @@ export async function POST({ locals, params }) { where: { bot_id: bot.id, voter_id: locals.actor!.id + }, + orderBy: { + created_time: 'desc' } }); diff --git a/src/routes/bots/[bot_id]/vote/+page.server.ts b/src/routes/bots/[bot_id]/vote/+page.server.ts index 4990cd8..56c030a 100644 --- a/src/routes/bots/[bot_id]/vote/+page.server.ts +++ b/src/routes/bots/[bot_id]/vote/+page.server.ts @@ -29,6 +29,9 @@ export async function load({ locals, params }) { where: { bot_id: bot.id, voter_id: locals.actor!.id + }, + orderBy: { + created_time: 'desc' } });