14 lines
305 B
TypeScript
14 lines
305 B
TypeScript
import http from '@core/http';
|
|
|
|
import type { RobotInfo } from './type';
|
|
|
|
const enum API {
|
|
获取所有机器人 = '/robot/getAll',
|
|
}
|
|
|
|
export async function getAllRobot(): Promise<RobotInfo[]> {
|
|
type D = RobotInfo[];
|
|
const data = await http.get<D>(API.获取所有机器人);
|
|
return data ?? [];
|
|
}
|