diff --git a/src/routes/posts/latest/+server.ts b/src/routes/posts/latest/+server.ts index b8c978e..0b29df7 100644 --- a/src/routes/posts/latest/+server.ts +++ b/src/routes/posts/latest/+server.ts @@ -8,7 +8,7 @@ const length = 8; // Number of posts to return export async function GET({ url }) { const db = await mongoConnect(); const col = db.db('fredboniface').collection('posts'); - const res = await col.find().sort({ _id: -1 }).limit(2).toArray(); + const res = await col.find().sort({ _id: -1 }).limit(length).toArray(); return json(res); }