import type { Key } from 'react'; import { request } from 'umi'; type CountersignParam = { auditId: Key | Key[]; chainId: string; type: string; target: number; userId: number; }; export async function auditCountersign(o: CountersignParam) { const { chainId, auditId, type, target, userId } = o; return request(`/goapi/audit/countersign/batch`, { method: 'POST', data: { chainId, target, userId, [type === 'uac' ? 'uacAuditId' : 'bpmAuditId']: Array.isArray(auditId) ? auditId : [auditId], }, }); }