MCPcopy Create free account
hub / github.com/PIKACHUIM/CFWorkerACME / operateOrder

Function operateOrder

frontend/src/api/order.ts:104–118  ·  view source on GitHub ↗
(
  uuid: string,
  action: OrderAction,
  domainName?: string,
  opts?: { revokeReason?: RevokeReason },
)

Source from the content-addressed store, hash-verified

102 * - 其他仅返回操作结果
103 */
104export async function operateOrder(
105 uuid: string,
106 action: OrderAction,
107 domainName?: string,
108 opts?: { revokeReason?: RevokeReason },
109): Promise<string> {
110 const params: Record<string, any> = { id: uuid, op: action };
111 if (domainName) params.cd = domainName;
112 if (action === 'ca_del' && opts?.revokeReason !== undefined) {
113 params.reason = opts.revokeReason;
114 }
115 const data = await apiGet<ApiResp>('/order/', params);
116 if (data.flags !== 0) throw new Error(data.texts || '操作失败');
117 return (data.order as string) || '';
118}

Callers 5

runFunction · 0.90
handleDownloadFunction · 0.90
handleDeleteFunction · 0.90
handleRemoveKeyFunction · 0.90
handleRevokeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected