Function
updateAdminUser
(
mail: string,
patch: { flag?: string; is_admin?: 0 | 1 | boolean; quota?: number },
)
Source from the content-addressed store, hash-verified
| 43 | |
| 44 | /** 更新用户:flag / is_admin / quota */ |
| 45 | export async function updateAdminUser( |
| 46 | mail: string, |
| 47 | patch: { flag?: string; is_admin?: 0 | 1 | boolean; quota?: number }, |
| 48 | ) { |
| 49 | const res = await http.patch(`/admin/users/${encodeURIComponent(mail)}`, patch); |
| 50 | return res.data; |
| 51 | } |
| 52 | |
| 53 | /** 重置密码(pass 为 SHA256 hex) */ |
| 54 | export async function resetAdminUserPassword(mail: string, pass: string) { |
Tested by
no test coverage detected