Svelte kit transition
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import { getFeed } from './_feed'
|
||||
|
||||
export async function get(req, res) {
|
||||
export async function get() {
|
||||
const feed = await getFeed()
|
||||
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'application/json',
|
||||
})
|
||||
res.end(feed.json1())
|
||||
return {
|
||||
status: 200,
|
||||
body: feed.json1(),
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,11 @@ import { getFeed } from './_feed'
|
||||
export async function get(req, res) {
|
||||
const feed = await getFeed()
|
||||
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'application/xml',
|
||||
})
|
||||
res.end(feed.rss2())
|
||||
return {
|
||||
status: 200,
|
||||
headers: {
|
||||
'Content-Type': 'application/xml',
|
||||
},
|
||||
body: feed.rss2(),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user