Merge pull request #271 from Hestia-Homes/feature/subtask_tasks
Some checks failed
Test Suite / unit-tests (push) Has been cancelled

order by job started and not job updated time
This commit is contained in:
Jun-te Kim 2026-05-15 13:35:51 +01:00 committed by GitHub
commit 4561e61968
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) {