mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
fix(user): harden profile and MFA workflows (#666)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { User } from '@/api/types'
|
||||
import type { PassKey, User } from '@/api/types'
|
||||
import { DEFAULT_PERMISSIONS } from '@/utils/permission'
|
||||
|
||||
/** 构造与用户查询接口一致的稳定测试数据。 */
|
||||
@@ -16,3 +16,14 @@ export function createUser(overrides: Partial<User> = {}): User {
|
||||
...overrides,
|
||||
}
|
||||
}
|
||||
|
||||
/** 构造与通行密钥列表接口一致的稳定测试数据。 */
|
||||
export function createPassKey(overrides: Partial<PassKey> = {}): PassKey {
|
||||
return {
|
||||
id: 11,
|
||||
name: 'MacBook Touch ID',
|
||||
created_at: '2026-08-01T08:00:00Z',
|
||||
last_used_at: '2026-08-10T08:00:00Z',
|
||||
...overrides,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user