@@ -76,14 +76,6 @@ func (w *workspaces) allWorkspacesForProject(rw http.ResponseWriter, r *http.Req
76
76
render .JSON (rw , r , apiWorkspaces )
77
77
}
78
78
79
- // workspace returns a new workspace.
80
- func (* workspaces ) workspace (rw http.ResponseWriter , r * http.Request ) {
81
- workspace := httpmw .WorkspaceParam (r )
82
-
83
- render .Status (r , http .StatusOK )
84
- render .JSON (rw , r , convertWorkspace (workspace ))
85
- }
86
-
87
79
// createWorkspace creates a new workspace for the currently authenticated user.
88
80
func (w * workspaces ) createWorkspace (rw http.ResponseWriter , r * http.Request ) {
89
81
var createWorkspace CreateWorkspaceRequest
@@ -140,6 +132,14 @@ func (w *workspaces) createWorkspace(rw http.ResponseWriter, r *http.Request) {
140
132
render .JSON (rw , r , convertWorkspace (workspace ))
141
133
}
142
134
135
+ // workspace returns a new workspace.
136
+ func (* workspaces ) workspace (rw http.ResponseWriter , r * http.Request ) {
137
+ workspace := httpmw .WorkspaceParam (r )
138
+
139
+ render .Status (r , http .StatusOK )
140
+ render .JSON (rw , r , convertWorkspace (workspace ))
141
+ }
142
+
143
143
// convertWorkspace consumes the database representation and outputs an API friendly representation.
144
144
func convertWorkspace (workspace database.Workspace ) Workspace {
145
145
return Workspace (workspace )
0 commit comments