Remove debug mode from chat and optimize image usage

This commit is contained in:
hamid zarghami
2025-10-14 16:45:33 +03:30
parent 4378f0e5ef
commit 4af0082c03
3 changed files with 141 additions and 84 deletions
+7 -6
View File
@@ -7,10 +7,11 @@ import {
UpdateAddressType,
WishlistResponse,
CommentsResponse,
ChatListResponse,
ChatMessagesResponse,
CreateChatRequest,
CreateChatResponse,
GetChatListResponse,
ChatDetailResponse,
} from "../types/ProfileTypes";
export const getProfile = async () => {
@@ -54,15 +55,15 @@ export const changeEmail = async (email: string) => {
};
// Chat Services
export const getChatList = async (): Promise<ChatListResponse> => {
const { data } = await axios.get("/chat/list");
export const getChatList = async (): Promise<GetChatListResponse> => {
const { data } = await axios.get("/chat/user");
return data;
};
export const getChatMessages = async (
export const getChatDetail = async (
chatId: string
): Promise<ChatMessagesResponse> => {
const { data } = await axios.get(`/chat/${chatId}/messages`);
): Promise<ChatDetailResponse> => {
const { data } = await axios.get(`/chat/user/${chatId}`);
return data;
};