feat:账号设置+密码重置
This commit is contained in:
@@ -267,6 +267,10 @@ export type WorkspaceBoundApi = {
|
||||
deletePlatformEmployee: (
|
||||
userId: string,
|
||||
) => Promise<{ user_id: string; deleted: boolean }>;
|
||||
resetPlatformEmployeePassword: (
|
||||
userId: string,
|
||||
newPassword: string,
|
||||
) => Promise<{ user_id: string; password_reset: boolean }>;
|
||||
listPlatformRoles: () => Promise<Role[]>;
|
||||
getPlatformRole: (roleCode: string) => Promise<Role>;
|
||||
listPlatformPermissions: () => Promise<PlatformPermission[]>;
|
||||
|
||||
@@ -58,3 +58,13 @@ export async function deletePlatformEmployee(
|
||||
);
|
||||
}
|
||||
|
||||
export async function resetPlatformEmployeePassword(
|
||||
userId: string,
|
||||
newPassword: string,
|
||||
): Promise<{ user_id: string; password_reset: boolean }> {
|
||||
return apiRequest(
|
||||
`/api/v1/platform/employees/${userId}/reset-password`,
|
||||
{ method: "POST", body: JSON.stringify({ new_password: newPassword }) },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user