first working prototype

This commit is contained in:
2023-06-19 20:38:45 +02:00
parent be19e63970
commit 4e6291fa5d
287 changed files with 863 additions and 268 deletions

View File

@ -0,0 +1,11 @@
import { json, type RequestHandler } from '@sveltejs/kit';
import { Recipe } from '../../../../../models/Recipe'
import { dbConnect, dbDisconnect } from '../../../../../utils/db';
export const GET: RequestHandler = async ({params}) => {
await dbConnect();
let found_in_season = (await Recipe.find({season: params.month}, 'name short_name images tags category icon description season').lean());
await dbDisconnect();
found_in_season = JSON.parse(JSON.stringify(found_in_season));
return json(found_in_season);
};