安全页重构:免密登录与活跃会话;按钮规范统一
CI / test (push) Successful in 53s

This commit is contained in:
2026-07-30 12:23:16 +08:00
parent d0fbecbd43
commit d675b950ee
43 changed files with 1944 additions and 475 deletions
+9 -3
View File
@@ -214,12 +214,18 @@ export function deleteUserApiKey(id: number, userId: string, fingerprint: string
})
}
/** 把刚创建的 key 设为本配置签名凭据(验证可用后落库,不删旧 key);私钥为创建时下发的那份回传 */
export function activateApiKey(id: number, fingerprint: string, privateKey: string): Promise<void> {
/** 把刚创建的 key 设为本配置签名凭据(验证可用后落库,不删旧 key);私钥为创建时下发的那份回传;
* userId 给定且异于当前签名用户时,一并把面板签名用户切换为该用户 */
export function activateApiKey(
id: number,
fingerprint: string,
privateKey: string,
userId?: string,
): Promise<void> {
if (mockOn) return mocked(undefined)
return request(`/oci-configs/${id}/activate-api-key`, {
method: 'POST',
body: { fingerprint, privateKey },
body: { userId, fingerprint, privateKey },
})
}