@@ -126,7 +126,7 @@ func (api *API) gitSSHKey(rw http.ResponseWriter, r *http.Request) {
126
126
func (api * API ) agentGitSSHKey (rw http.ResponseWriter , r * http.Request ) {
127
127
ctx := r .Context ()
128
128
agent := httpmw .WorkspaceAgent (r )
129
- resource , err := api .Database .GetWorkspaceResourceByID (agentCtx , agent .ResourceID )
129
+ resource , err := api .Database .GetWorkspaceResourceByID (ctx , agent .ResourceID )
130
130
if err != nil {
131
131
httpapi .Write (ctx , rw , http .StatusInternalServerError , codersdk.Response {
132
132
Message : "Internal error fetching workspace resource." ,
@@ -135,7 +135,7 @@ func (api *API) agentGitSSHKey(rw http.ResponseWriter, r *http.Request) {
135
135
return
136
136
}
137
137
138
- job , err := api .Database .GetWorkspaceBuildByJobID (agentCtx , resource .JobID )
138
+ job , err := api .Database .GetWorkspaceBuildByJobID (ctx , resource .JobID )
139
139
if err != nil {
140
140
httpapi .Write (ctx , rw , http .StatusInternalServerError , codersdk.Response {
141
141
Message : "Internal error fetching workspace build." ,
@@ -144,7 +144,7 @@ func (api *API) agentGitSSHKey(rw http.ResponseWriter, r *http.Request) {
144
144
return
145
145
}
146
146
147
- workspace , err := api .Database .GetWorkspaceByID (agentCtx , job .WorkspaceID )
147
+ workspace , err := api .Database .GetWorkspaceByID (ctx , job .WorkspaceID )
148
148
if err != nil {
149
149
httpapi .Write (ctx , rw , http .StatusInternalServerError , codersdk.Response {
150
150
Message : "Internal error fetching workspace." ,
@@ -153,7 +153,7 @@ func (api *API) agentGitSSHKey(rw http.ResponseWriter, r *http.Request) {
153
153
return
154
154
}
155
155
156
- gitSSHKey , err := api .Database .GetGitSSHKey (agentCtx , workspace .OwnerID )
156
+ gitSSHKey , err := api .Database .GetGitSSHKey (ctx , workspace .OwnerID )
157
157
if err != nil {
158
158
httpapi .Write (ctx , rw , http .StatusInternalServerError , codersdk.Response {
159
159
Message : "Internal error fetching git SSH key." ,
0 commit comments