order by job started and not job updated time

This commit is contained in:
Jun-te Kim 2026-05-15 10:10:00 +00:00
parent 707df2dea9
commit cd47aef985
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ export async function GET(
.leftJoin(subTasks, eq(subTasks.taskId, tasks.id))
.where(eq(tasks.sourceId, portfolioId))
.groupBy(tasks.id)
.orderBy(desc(tasks.updatedAt))
.orderBy(desc(tasks.jobStarted))
.limit(limit)
.offset(offset);

View file

@ -13,7 +13,7 @@ export async function GET(
.select()
.from(subTasks)
.where(eq(subTasks.taskId, taskId))
.orderBy(subTasks.updatedAt);
.orderBy(subTasks.jobStarted);
return NextResponse.json(taskSubTasks);
} catch (error) {