update homepage draft and other pages
This commit is contained in:
18
src/routes/projects/progress/+page.server.ts
Executable file
18
src/routes/projects/progress/+page.server.ts
Executable file
@@ -0,0 +1,18 @@
|
||||
import { db } from '$lib/db';
|
||||
import { tasks } from '$lib/db/schema.js';
|
||||
import { desc } from 'drizzle-orm';
|
||||
|
||||
export const load = async () => {
|
||||
return {
|
||||
tasks: await db.query.tasks.findMany({
|
||||
with: {
|
||||
tasksToTopics: {
|
||||
with: {
|
||||
topic: true
|
||||
}
|
||||
}
|
||||
},
|
||||
orderBy: [desc(tasks.currentPoints)]
|
||||
})
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user