implement event persistence and improve Mongoose TypeScript patterns
- Add event persistence: confirmed events are now saved to MongoDB - Refactor Mongoose models to use virtuals for id field with IdVirtual interface - Update repositories to use toJSON() with consistent type casting - Add more test responses for chat (doctor, birthday, gym, etc.) - Show event description in ProposedEventCard - Change mongo-express port to 8083 - Update CLAUDE.md with Mongoose model pattern documentation
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
ChatMessage,
|
||||
ConversationSummary,
|
||||
GetMessagesOptions,
|
||||
CreateEventDTO,
|
||||
} from "@caldav/shared";
|
||||
import { ApiClient } from "./ApiClient";
|
||||
|
||||
@@ -14,9 +15,10 @@ export const ChatService = {
|
||||
|
||||
confirmEvent: async (
|
||||
conversationId: string,
|
||||
messageId: string
|
||||
messageId: string,
|
||||
event: CreateEventDTO
|
||||
): Promise<ChatResponse> => {
|
||||
return ApiClient.post<ChatResponse>(`/chat/confirm/${conversationId}/${messageId}`);
|
||||
return ApiClient.post<ChatResponse>(`/chat/confirm/${conversationId}/${messageId}`, event);
|
||||
},
|
||||
|
||||
rejectEvent: async (
|
||||
|
||||
Reference in New Issue
Block a user