Skip to content

Commit 222ca3c

Browse files
committed
Fix status codes
1 parent 1abb627 commit 222ca3c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

coderd/files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (api *api) postFile(rw http.ResponseWriter, r *http.Request) {
6262
return
6363
}
6464

65-
httpapi.Write(rw, http.StatusOK, codersdk.UploadResponse{
65+
httpapi.Write(rw, http.StatusCreated, codersdk.UploadResponse{
6666
Hash: file.Hash,
6767
})
6868
}

coderd/organizations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (api *api) postTemplateVersionsByOrganization(rw http.ResponseWriter, r *ht
144144
return
145145
}
146146

147-
httpapi.Write(rw, http.StatusOK, convertTemplateVersion(templateVersion, convertProvisionerJob(provisionerJob)))
147+
httpapi.Write(rw, http.StatusCreated, convertTemplateVersion(templateVersion, convertProvisionerJob(provisionerJob)))
148148
}
149149

150150
// Create a new template in an organization.

0 commit comments

Comments
 (0)