[READ-ONLY] Mirror of https://github.com/Savy011/rubble. an archive for weeekly's 🫧 messages rubble.yvas.me
Something went wrong. Try again.
12345678910111213141516171819202122232425262728import { getChatMessages } from "$lib/messages";import { Elysia, t } from 'elysia';
export const api = new Elysia({ prefix: '/api' }) .get('/', () => 'hello rubble user!') .get('/messages', (ctx) => { const { member, page } = ctx.query
const messages = getChatMessages(member, page);
return { member, page, messages } }, { query: t.Object({ member: t.Union([ t.Literal("soojin"), t.Literal("monday"), t.Literal("soeun"), t.Literal("jiyoon"), t.Literal("jaehee"), t.Literal("jihan"), t.Literal("zoa"), ]), page: t.Integer(), }) })
export type Api = typeof api