mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-07-13 19:13:43 +00:00
feat(#46): Componentise the boxes view
This commit is contained in:
@@ -4,11 +4,13 @@ import CombinedDataRepository from '$lib/repositories/CombinedDataRepository';
|
||||
|
||||
export const GET = async ({ url }) => {
|
||||
const enableForms = url.searchParams.get('enableForms') === 'true';
|
||||
const region = url.searchParams.get('region');
|
||||
const game = url.searchParams.get('game');
|
||||
|
||||
try {
|
||||
await dbConnect();
|
||||
const repo = new CombinedDataRepository();
|
||||
const combinedData = await repo.findAllCombinedData(enableForms);
|
||||
const combinedData = await repo.findAllCombinedData(enableForms, region, game);
|
||||
|
||||
if (combinedData.length === 0) {
|
||||
return json({ error: 'No combined data found' }, { status: 404 });
|
||||
|
||||
Reference in New Issue
Block a user