Initial commit - WhyRating Engine (Google Reviews Scraper)

This commit is contained in:
Alejandro Gutiérrez
2026-02-02 18:19:00 +00:00
parent 0543a08242
commit 2206ddeff2
136 changed files with 51138 additions and 855 deletions

View File

@@ -1,13 +1,19 @@
import { NextRequest, NextResponse } from 'next/server';
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8001';
export async function GET(request: NextRequest) {
try {
const { searchParams } = new URL(request.url);
const limit = searchParams.get('limit') || '100';
const status = searchParams.get('status');
const response = await fetch(`${API_BASE_URL}/jobs?limit=${limit}`);
let url = `${API_BASE_URL}/jobs?limit=${limit}`;
if (status) {
url += `&status=${status}`;
}
const response = await fetch(url);
if (!response.ok) {
return NextResponse.json(