Adjust posts list
This commit is contained in:
parent
c3ec9acbdd
commit
2e3f88dd0a
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user