Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32759a8

Browse files
authored
fix: trim scope of agent private key route (#886)
1 parent 9da17be commit 32759a8

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

coderd/gitsshkey.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ func (api *api) agentGitSSHKey(rw http.ResponseWriter, r *http.Request) {
110110

111111
render.Status(r, http.StatusOK)
112112
render.JSON(rw, r, codersdk.AgentGitSSHKey{
113-
UserID: gitSSHKey.UserID,
114-
CreatedAt: gitSSHKey.CreatedAt,
115-
UpdatedAt: gitSSHKey.UpdatedAt,
116113
PrivateKey: gitSSHKey.PrivateKey,
117114
})
118115
}

codersdk/gitsshkey.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ type GitSSHKey struct {
1919
}
2020

2121
type AgentGitSSHKey struct {
22-
UserID uuid.UUID `json:"user_id"`
23-
CreatedAt time.Time `json:"created_at"`
24-
UpdatedAt time.Time `json:"updated_at"`
25-
PrivateKey string `json:"private_key"`
22+
PrivateKey string `json:"private_key"`
2623
}
2724

2825
// GitSSHKey returns the user's git SSH public key.

0 commit comments

Comments
 (0)