created frontend with login, room listing and creation, and message page with all features

This commit is contained in:
2025-12-15 14:50:50 +01:00
parent f10c761f1b
commit d6a26c0d09
18 changed files with 653 additions and 165 deletions

17
src/api/messages.ts Normal file
View File

@@ -0,0 +1,17 @@
import { apiFetch } from './client'
import type { Message } from '../types/api'
export function fetchMessages(roomUuid: string) {
return apiFetch<Message[]>(`/messages/${roomUuid}`)
}
export function sendMessage(roomUuid: string, content: string) {
return apiFetch<Message>(`/messages/${roomUuid}`, {
method: 'POST',
body: JSON.stringify({
message_type: 'text',
content,
}),
})
}