mirror of
https://github.com/danbulant/design
synced 2026-05-19 04:08:46 +00:00
fix the response type
This commit is contained in:
parent
c212e18761
commit
99c7052808
1 changed files with 5 additions and 3 deletions
|
|
@ -238,9 +238,11 @@ export async function GET() {
|
|||
return new Date(b.date) - new Date(a.date)
|
||||
});
|
||||
|
||||
return {
|
||||
body: allPosts
|
||||
};
|
||||
return new Response(JSON.stringify(allPosts.filter(t => new Date(t.date) < Date.now())), {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue