Files
dognation_PT/src/api/chat.ts
T

18 lines
437 B
TypeScript
Raw Normal View History

2026-07-11 09:18:23 +09:00
import { http } from './http'
export interface ChatMessage {
id: number
spotId: number | null
matchId: number | null
2026-07-11 09:18:23 +09:00
senderId: number
senderNickname: string
content: string
createdAt: string
}
export const chatApi = {
history: (spotId: number) => http.get<ChatMessage[]>(`/api/chat/spots/${spotId}/messages`),
matchHistory: (matchId: number) =>
http.get<ChatMessage[]>(`/api/chat/matches/${matchId}/messages`),
2026-07-11 09:18:23 +09:00
}