diff options
Diffstat (limited to 'src/routes/api/hololive/+server.ts')
| -rw-r--r-- | src/routes/api/hololive/+server.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/routes/api/hololive/+server.ts b/src/routes/api/hololive/+server.ts new file mode 100644 index 00000000..331d776a --- /dev/null +++ b/src/routes/api/hololive/+server.ts @@ -0,0 +1,10 @@ +import parseScheduleHtml from 'holo-schedule'; +import getScheduleHtml from 'holo-schedule/lib/getScheduleHtml'; + +export const GET = async () => + Response.json(parseScheduleHtml(await getScheduleHtml()), { + headers: { + 'Access-Control-Allow-Origin': 'https://due.moe', + 'Cache-Control': 'public, max-age=300, s-maxage=300' + } + }); |