api ulandi
This commit is contained in:
@@ -1,9 +1,25 @@
|
||||
import type { TourItem } from "@/features/tour-plan/lib/types";
|
||||
import httpClient from "@/shared/config/api/httpClient";
|
||||
import { TOUR_PLAN } from "@/shared/config/api/URLs";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
||||
export const tour_plan_api = {
|
||||
async list() {
|
||||
const res = await httpClient.get(TOUR_PLAN);
|
||||
async list(): Promise<AxiosResponse<TourItem>> {
|
||||
const res = await httpClient.get(`${TOUR_PLAN}list/`);
|
||||
return res;
|
||||
},
|
||||
|
||||
async send_location({
|
||||
id,
|
||||
body,
|
||||
}: {
|
||||
body: {
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
};
|
||||
id: number;
|
||||
}): Promise<AxiosResponse<TourItem>> {
|
||||
const res = await httpClient.patch(`${TOUR_PLAN}${id}/update/`, body);
|
||||
return res;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user