chore: flatten repo
This commit is contained in:
18
src/routes/progress/topics/[id]/+page.server.ts
Normal file
18
src/routes/progress/topics/[id]/+page.server.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { db } from '$lib/db';
|
||||
import { topics } from '$lib/db/schema';
|
||||
import { eq } from 'drizzle-orm';
|
||||
|
||||
export const load = async ({ params }) => {
|
||||
return {
|
||||
topic: await db.query.topics.findFirst({
|
||||
with: {
|
||||
topicsToTasks: {
|
||||
with: {
|
||||
task: true
|
||||
}
|
||||
}
|
||||
},
|
||||
where: eq(topics.id, params.id)
|
||||
})
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user