cập nhật modal CRUD thuyền viên trong trip
This commit is contained in:
19
controller/CrewController.ts
Normal file
19
controller/CrewController.ts
Normal 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",
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user