Files
MyTool/frontend/src/api/health.ts
T

11 lines
335 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import request from './request';
/**
* 后端健康检查。
* 对应 GET /api/health,成功时后端返回 Result<String>data 为 "OK")。
* request 拦截器会自动解包 Result,成功返回 data 字符串;失败会 reject。
*/
export function getHealth(): Promise<string> {
return request.get('/api/health');
}