s11
parent
f98b9f9036
commit
70ffe4a76a
|
@ -102,17 +102,8 @@ export async function GET(request: NextRequest) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Try to get candidates using the service
|
// Try to get candidates using the service
|
||||||
const result = await candidateService.getCandidates({
|
const result = await candidateService.getCandidates({status, technology, visaStatus, openToRelocate: openToRelocate === 'true', currentStatus, search, limit, page});
|
||||||
status,
|
console.log('mongo result', result);
|
||||||
technology,
|
|
||||||
visaStatus,
|
|
||||||
openToRelocate: openToRelocate === 'true',
|
|
||||||
currentStatus,
|
|
||||||
search,
|
|
||||||
limit,
|
|
||||||
page
|
|
||||||
});
|
|
||||||
console.log('mongo result', result);
|
|
||||||
return NextResponse.json(result);
|
return NextResponse.json(result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("MongoDB connection error, using demo candidates", error);
|
console.log("MongoDB connection error, using demo candidates", error);
|
||||||
|
|
|
@ -86,7 +86,7 @@ export default function CandidatesPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log('frontend response', data)
|
console.log('frontend response', data)
|
||||||
// For this demo, we'll use sample data since we can't connect to a real DB
|
// For this demo, we'll use sample data since we can't connect to a real DB
|
||||||
// In a real app, we would use data.candidates and data.pagination
|
// In a real app, we would use data.candidates and data.pagination
|
||||||
const sampleCandidates: Candidate[] = [
|
const sampleCandidates: Candidate[] = [
|
||||||
|
|
Loading…
Reference in New Issue