This commit is contained in:
@@ -19,6 +19,7 @@ import type {
|
||||
AssetPackageParams,
|
||||
AssetCurrentPackageResponse,
|
||||
DeviceStopResponse,
|
||||
AssetStartResponse,
|
||||
AssetWalletTransactionListResponse,
|
||||
AssetWalletTransactionParams,
|
||||
AssetWalletResponse,
|
||||
@@ -182,9 +183,16 @@ export class AssetService extends BaseService {
|
||||
* 前端按资产标识限制 5 分钟内只能调用一次
|
||||
* @param identifier 资产标识符(ICCID 或 VirtualNo)
|
||||
*/
|
||||
static startAsset(identifier: string): Promise<BaseResponse<void>> {
|
||||
static startAsset(
|
||||
identifier: string,
|
||||
config?: Record<string, any>
|
||||
): Promise<BaseResponse<AssetStartResponse>> {
|
||||
return runRateLimitedAssetAction('start', identifier, () =>
|
||||
this.post<BaseResponse<void>>(`/api/admin/assets/${identifier}/start`, {})
|
||||
this.post<BaseResponse<AssetStartResponse>>(
|
||||
`/api/admin/assets/${identifier}/start`,
|
||||
{},
|
||||
config
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user