Migrate articles to standalone endpoints

This commit is contained in:
2022-03-24 18:38:53 +01:00
parent fecdeee94d
commit 5f1c7e9804
4 changed files with 15 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
import { getBlogListing } from './_content'
export async function get({ url: { searchParams } }) {
console.log('bloglistingparams', searchParams)
//Regexp for getting an optional tag and a page from the params
const tag = undefined
const filteredContents = await getBlogListing(tag)
return {
status: 200,
body: {
posts: filteredContents,
},
}
}