This commit is contained in:
marzban-dev
2025-03-27 22:21:36 +03:30
parent 17b94743cd
commit 23f9e4081b
+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;