fix: trim scope of agent private key route (#886)

This commit is contained in:
Garrett Delfosse
2022-04-06 14:54:13 +00:00
committed by GitHub
parent 9da17be61e
commit 32759a8714
2 changed files with 1 additions and 7 deletions
-3
View File
@@ -110,9 +110,6 @@ func (api *api) agentGitSSHKey(rw http.ResponseWriter, r *http.Request) {
render.Status(r, http.StatusOK)
render.JSON(rw, r, codersdk.AgentGitSSHKey{
UserID: gitSSHKey.UserID,
CreatedAt: gitSSHKey.CreatedAt,
UpdatedAt: gitSSHKey.UpdatedAt,
PrivateKey: gitSSHKey.PrivateKey,
})
}
+1 -4
View File
@@ -19,10 +19,7 @@ type GitSSHKey struct {
}
type AgentGitSSHKey struct {
UserID uuid.UUID `json:"user_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
PrivateKey string `json:"private_key"`
PrivateKey string `json:"private_key"`
}
// GitSSHKey returns the user's git SSH public key.