Skip to content

Commit

Permalink
fix: set limits for resume api
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdavis committed Jul 9, 2024
1 parent 3b136c4 commit c673390
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/registry/pages/api/resumes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ const supabase = createClient(supabaseUrl, supabaseKey);
const gravatar = require('gravatar');

export default async function handler(req, res) {
// const { limit } = req.query;
const { limit } = req.query;
console.time('getResumes');
const { data } = await supabase.from('resumes').select().limit(300);
// .limit(limit || 3000);
// .order('created_at', { ascending: false });
const { data } = await supabase
.from('resumes')
.select()
.order('created_at', { ascending: false })
.limit(limit || 3000);
console.timeEnd('getResumes');

console.time('mapResumes');
Expand Down

0 comments on commit c673390

Please sign in to comment.