mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd): document HTTP 201 for workspace and build creation (#27903)
This commit is contained in:
@@ -364,7 +364,7 @@ func (api *API) workspaceByOwnerAndName(rw http.ResponseWriter, r *http.Request)
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param user path string true "Username, UUID, or me"
|
||||
// @Param request body codersdk.CreateWorkspaceRequest true "Create workspace request"
|
||||
// @Success 200 {object} codersdk.Workspace
|
||||
// @Success 201 {object} codersdk.Workspace
|
||||
// @Router /api/v2/organizations/{organization}/members/{user}/workspaces [post]
|
||||
func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
@@ -425,7 +425,7 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
|
||||
// @Tags Workspaces
|
||||
// @Param user path string true "Username, UUID, or me"
|
||||
// @Param request body codersdk.CreateWorkspaceRequest true "Create workspace request"
|
||||
// @Success 200 {object} codersdk.Workspace
|
||||
// @Success 201 {object} codersdk.Workspace
|
||||
// @Router /api/v2/users/{user}/workspaces [post]
|
||||
func (api *API) postUserWorkspaces(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user