api: make postLayer returns a Layer
This commit is contained in:
parent
4f0f8136c0
commit
4516d6fd73
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user