feat(后台): 店铺密钥页支持配置静态代理 + 手动检测白名单——列表展示代理/失败次数,操作列加「检测白名单」按钮(绕过缓存真实请求并重置自动重试计数)
This commit is contained in:
@@ -55,3 +55,13 @@ export async function updateShopKey(id: number, form: ShopKeyFormValues): Promis
|
||||
export async function deleteShopKey(id: number): Promise<void> {
|
||||
await http.delete<unknown>(`${SHOP_KEYS_ENDPOINT}/${id}`)
|
||||
}
|
||||
|
||||
/** 手动检测 IP 白名单:POST /api/admin/shop-keys/{id}/check-whitelist;返回更新后的记录。 */
|
||||
export async function checkShopKeyWhitelist(id: number): Promise<ShopKeyItem> {
|
||||
const { data } = await http.post<unknown>(`${SHOP_KEYS_ENDPOINT}/${id}/check-whitelist`)
|
||||
const item = toShopKeyItem(unwrap<unknown>(data))
|
||||
if (!item) {
|
||||
throw new Error('白名单检测响应异常:未返回有效记录')
|
||||
}
|
||||
return item
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user