import { handleColorFilter } from './routes/filter-by-color.js'; export default { async fetch(request, env, ctx) { const url = new URL(request.url); if (request.method === 'POST' && url.pathname === '/api/filter-by-color') { return handleColorFilter(request, env); // 👈 твоя логика фильтра } return new Response('Not Found', { status: 404 }); } }