19 lines
262 B
TypeScript
Executable File
19 lines
262 B
TypeScript
Executable File
import { db } from '$lib/server/db';
|
|
|
|
export const load = async () => {
|
|
return {
|
|
tasks: await db.query.tasks.findMany({
|
|
with: {
|
|
tasksToTopics: {
|
|
with: {
|
|
topic: true
|
|
}
|
|
}
|
|
},
|
|
orderBy: {
|
|
currentPoints: 'desc'
|
|
}
|
|
})
|
|
};
|
|
};
|