Merge branch 'main' of https://github.com/Byeto-Company/hossein_por_shop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user