Files
dkala-front/src/app/[name]/(Main)/about/service/AboutService.ts
T
2026-02-10 10:05:33 +03:30

28 lines
684 B
TypeScript

import { api } from "@/config/axios";
import {
AboutResponse,
ReviewsResponse,
SchedulesResponse,
} from "../types/Types";
export const getAbout = async (name: string): Promise<AboutResponse> => {
const { data } = await api.get<AboutResponse>(`/public/shops/${name}`);
return data;
};
export const getReviews = async (name: string): Promise<ReviewsResponse> => {
const { data } = await api.get<ReviewsResponse>(
`/public/reviews/shop/${name}`
);
return data;
};
export const getSchedules = async (
name: string
): Promise<SchedulesResponse> => {
const { data } = await api.get<SchedulesResponse>(
`/public/schedules/shop/${name}`
);
return data;
};