api: make postLayer returns a Layer

This commit is contained in:
Jimmy Zelinskie 2016-02-05 18:28:00 -05:00
parent 4f0f8136c0
commit 4516d6fd73

View File

@ -89,6 +89,13 @@ func postLayer(w http.ResponseWriter, r *http.Request, p httprouter.Params, ctx
}
w.WriteHeader(http.StatusCreated)
writeResponse(w, http.StatusCreated, LayerEnvelope{Layer: &Layer{
Name: request.Layer.Name,
ParentName: request.Layer.ParentName,
Path: request.Layer.Path,
Format: request.Layer.Format,
IndexedByVersion: worker.Version,
}})
return postLayerRoute, http.StatusCreated
}