石墨仪设备 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
702 B

import httpRequest, { type BaseResponse } from "../httpRequest";
import { addTxnRecord } from "../txn";
import type { OperationCmd } from "./cmdTypes";
export function debugCmd(params: { command: OperationCmd; params: Record<string, any> }) {
const commandId = addTxnRecord({ ...params, category: "debug" });
return httpRequest<BaseResponse<string>>({ url: "/api/cmd/", params: { ...params, commandId }, method: "POST" });
}
export function taskCmd(params: { command: OperationCmd; params: Record<string, any> }) {
const commandId = addTxnRecord({ ...params, category: "task" });
return httpRequest<BaseResponse<string>>({ url: "/api/cmd/", params: { ...params, commandId }, method: "POST" });
}