also search through season, exclude "🍽️"recipes from being in season
This commit is contained in:
parent
09b5e99867
commit
e2a7de3e90
@ -27,14 +27,14 @@ h1{
|
||||
</svelte:head>
|
||||
|
||||
<h1>Rezepte</h1>
|
||||
<section>
|
||||
|
||||
<Search></Search>
|
||||
|
||||
<MediaScroller title="In Saison">
|
||||
{#each data.season as recipe}
|
||||
<Card {recipe} {current_month} search=""></Card>
|
||||
<Card {recipe} {current_month}></Card>
|
||||
{/each}
|
||||
</MediaScroller>
|
||||
</section>
|
||||
<Search></Search>
|
||||
|
||||
{#each categories as category}
|
||||
<MediaScroller title={category}>
|
||||
|
@ -6,7 +6,7 @@ import { rand_array } from '$lib/js/randomize';
|
||||
|
||||
export const GET: RequestHandler = async ({params}) => {
|
||||
await dbConnect();
|
||||
let found_in_season = rand_array(await Recipe.find({season: params.month}, 'name short_name images tags category icon description season').lean());
|
||||
let found_in_season = rand_array(await Recipe.find({season: params.month, icon: {$ne: "🍽️"}}, '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);
|
||||
|
Loading…
Reference in New Issue
Block a user