mirror of
https://github.com/coder/coder.git
synced 2026-10-24 01:26:25 +08:00
feat: Add SSH Keys page on /preferences/ssh-keys (#1478)
This commit is contained in:
@@ -206,3 +206,13 @@ export const updateUserRoles = async (
|
||||
const response = await axios.put<TypesGen.User>(`/api/v2/users/${userId}/roles`, { roles })
|
||||
return response.data
|
||||
}
|
||||
|
||||
export const getUserSSHKey = async (userId = "me"): Promise<TypesGen.GitSSHKey> => {
|
||||
const response = await axios.get<TypesGen.GitSSHKey>(`/api/v2/users/${userId}/gitsshkey`)
|
||||
return response.data
|
||||
}
|
||||
|
||||
export const regenerateUserSSHKey = async (userId = "me"): Promise<TypesGen.GitSSHKey> => {
|
||||
const response = await axios.put<TypesGen.GitSSHKey>(`/api/v2/users/${userId}/gitsshkey`)
|
||||
return response.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user