thêm giao diện quản lý thuyền
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { api } from "@/config";
|
||||
import {
|
||||
API_GET_ALL_SHIP,
|
||||
API_GET_PHOTO,
|
||||
API_GET_SHIP_GROUPS,
|
||||
API_GET_SHIP_TYPES,
|
||||
API_PATH_SEARCH_THINGS,
|
||||
@@ -16,3 +18,22 @@ export async function queryShipTypes() {
|
||||
export async function queryShipGroups() {
|
||||
return await api.get<Model.ShipGroup[]>(API_GET_SHIP_GROUPS);
|
||||
}
|
||||
|
||||
export async function queryAllShips(params: Model.SearchThingBody) {
|
||||
return await api.get<Model.ShipResponse>(API_GET_ALL_SHIP, {
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
export async function queryShipsImage(ship_id: string) {
|
||||
return await api.get(`${API_GET_PHOTO}/ship/${ship_id}/main`, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
}
|
||||
|
||||
export async function queryUpdateShip(
|
||||
shipId: string,
|
||||
body: Model.ShipBodyRequest
|
||||
) {
|
||||
return await api.put(`${API_GET_ALL_SHIP}/${shipId}`, body);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user