copy base dmenu to dkala
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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/restaurants/${name}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getReviews = async (name: string): Promise<ReviewsResponse> => {
|
||||
const { data } = await api.get<ReviewsResponse>(
|
||||
`/public/reviews/restuarant/${name}`
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getSchedules = async (
|
||||
name: string
|
||||
): Promise<SchedulesResponse> => {
|
||||
const { data } = await api.get<SchedulesResponse>(
|
||||
`/public/schedules/restaurant/${name}`
|
||||
);
|
||||
return data;
|
||||
};
|
||||
Reference in New Issue
Block a user