mirror of
https://github.com/coder/coder.git
synced 2026-10-24 01:26:25 +08:00
feat: add user password change page (#1866)
This commit is contained in:
+4
-2
@@ -223,8 +223,10 @@ export const suspendUser = async (userId: TypesGen.User["id"]): Promise<TypesGen
|
||||
return response.data
|
||||
}
|
||||
|
||||
export const updateUserPassword = async (password: string, userId: TypesGen.User["id"]): Promise<undefined> =>
|
||||
axios.put(`/api/v2/users/${userId}/password`, { password })
|
||||
export const updateUserPassword = async (
|
||||
userId: TypesGen.User["id"],
|
||||
updatePassword: TypesGen.UpdateUserPasswordRequest,
|
||||
): Promise<undefined> => axios.put(`/api/v2/users/${userId}/password`, updatePassword)
|
||||
|
||||
export const getSiteRoles = async (): Promise<Array<TypesGen.Role>> => {
|
||||
const response = await axios.get<Array<TypesGen.Role>>(`/api/v2/users/roles`)
|
||||
|
||||
Reference in New Issue
Block a user