feat: v1 release - serving calculator, notes UI, tags, random recipe, confetti, favorites section, PWA icons, category icons, animations

This commit is contained in:
clawd
2026-02-18 10:23:22 +00:00
parent 60ca01fb94
commit de567f93db
17 changed files with 476 additions and 39 deletions

View File

@@ -2,6 +2,12 @@ import { FastifyInstance } from 'fastify';
import * as svc from '../services/recipe.service.js';
export async function recipeRoutes(app: FastifyInstance) {
app.get('/api/recipes/random', async (request, reply) => {
const recipe = svc.getRandomRecipe();
if (!recipe) return reply.status(404).send({ error: 'No recipes found' });
return recipe;
});
app.get('/api/recipes/search', async (request) => {
const { q } = request.query as { q?: string };
if (!q) return { data: [], total: 0 };