2024-07-02 13:03:09 +02:00
|
|
|
import { fetchNewsList } from ':src/blog/mod.ts'
|
|
|
|
import { SessionHandlers } from ':src/session/mod.ts'
|
|
|
|
import { respondApi, respondApiStream } from ':src/utils.ts'
|
|
|
|
|
|
|
|
export const handler: SessionHandlers = {
|
2024-07-16 16:34:43 +02:00
|
|
|
GET() {
|
|
|
|
try {
|
|
|
|
const newsList = fetchNewsList('cohabit')
|
|
|
|
return respondApiStream(newsList)
|
|
|
|
} catch (error) {
|
|
|
|
return respondApi('error', error)
|
|
|
|
}
|
|
|
|
},
|
2024-07-02 13:03:09 +02:00
|
|
|
}
|