mirror of
https://github.com/danbulant/design
synced 2026-05-24 12:23:57 +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 new Date(b.date) - new Date(a.date)
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return new Response(JSON.stringify(allPosts.filter(t => new Date(t.date) < Date.now())), {
|
||||||
body: allPosts
|
headers: {
|
||||||
};
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue