cập nhật modal CRUD thuyền viên trong trip

This commit is contained in:
2025-12-24 21:58:18 +07:00
parent 24847504b1
commit 190e44b09e
13 changed files with 822 additions and 68 deletions

View File

@@ -0,0 +1,19 @@
import { api } from "@/config";
import { API_CREW, API_GET_PHOTO } from "@/constants";
export async function newCrew(body: Model.NewCrewAPIRequest) {
return api.post(API_CREW, body);
}
export async function updateCrewInfo(
personalId: string,
body: Model.UpdateCrewAPIRequest
) {
return api.put(`${API_CREW}/${personalId}`, body);
}
export async function queryCrewImage(personal_id: string) {
return await api.get(`${API_GET_PHOTO}/people/${personal_id}/main`, {
responseType: "arraybuffer",
});
}