mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-14 02:20:53 +08:00
19 lines
424 B
TypeScript
19 lines
424 B
TypeScript
import axios from 'axios';
|
|
|
|
/** 重启 */
|
|
export const appRestart = () => axios.get('api/v1/restart');
|
|
|
|
/** 启动 */
|
|
export const appStart = () => axios.get('api/v1/start');
|
|
|
|
/** 停止 */
|
|
export const appStop = () => axios.get('api/v1/stop');
|
|
|
|
/** 状态 */
|
|
export async function appStatus() {
|
|
const { data } = await axios.get<{ status: 'stop' | 'running' }>(
|
|
'api/v1/status'
|
|
);
|
|
return data.status !== 'stop';
|
|
}
|