Cập nhật API thêm trip (validate)

This commit is contained in:
2025-12-22 15:22:06 +07:00
parent 12fb7c48ed
commit 67e9fc22a3
9 changed files with 228 additions and 86 deletions

View File

@@ -6,6 +6,7 @@ import {
API_UPDATE_FISHING_LOGS,
API_UPDATE_TRIP_STATUS,
API_GET_LAST_TRIP,
API_POST_TRIP,
} from "@/constants";
export async function queryTrip() {
@@ -31,3 +32,7 @@ export async function queryUpdateFishingLogs(body: Model.FishingLog) {
export async function queryTripsList(body: Model.TripListBody) {
return api.post(API_POST_TRIPSLIST, body);
}
export async function createTrip(thingId: string, body: Model.TripAPIBody) {
return api.post<Model.Trip>(`${API_POST_TRIP}/${thingId}`, body);
}