This commit is contained in:
Mamalizz
2025-03-27 23:08:29 +03:30
47 changed files with 355 additions and 157 deletions
+4 -4
View File
@@ -6,9 +6,9 @@ import { useAuth } from "~/composables/api/auth/useAuth";
// types
export type GetBranchResponse = ApiPaginated<Chat>;
export type GetChatResponse = ApiPaginated<Chat>;
const useGetBranch = (productId: string | number, enabled: Ref<boolean>) => {
const useGetChat = (productId: string | number, enabled: Ref<boolean>) => {
// state
const { $axios: axios } = useNuxtApp();
@@ -26,7 +26,7 @@ const useGetBranch = (productId: string | number, enabled: Ref<boolean>) => {
limit: number;
offset: number;
}) => {
const { data } = await axios.get<GetBranchResponse>(
const { data } = await axios.get<GetChatResponse>(
`${API_ENDPOINTS.chat.messages}/${productId}`,
{
params: {
@@ -65,4 +65,4 @@ const useGetBranch = (productId: string | number, enabled: Ref<boolean>) => {
});
};
export default useGetBranch;
export default useGetChat;