15 lines
298 B
TypeScript
15 lines
298 B
TypeScript
|
|
import { http } from './http'
|
||
|
|
|
||
|
|
export interface ChatMessage {
|
||
|
|
id: number
|
||
|
|
spotId: number
|
||
|
|
senderId: number
|
||
|
|
senderNickname: string
|
||
|
|
content: string
|
||
|
|
createdAt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export const chatApi = {
|
||
|
|
history: (spotId: number) => http.get<ChatMessage[]>(`/api/chat/spots/${spotId}/messages`),
|
||
|
|
}
|