File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ func serveDevfile(c *gin.Context) {
141141
142142// serveDevfileStarterProject returns the starter project content for the devfile
143143func serveDevfileStarterProject (c * gin.Context ) {
144- devfileName := c .Param ("devfileName " )
144+ devfileName := c .Param ("name " )
145145 starterProjectName := c .Param ("starterProjectName" )
146146 devfileBytes , devfileIndexSchema := fetchDevfile (c , devfileName )
147147
@@ -177,6 +177,17 @@ func serveDevfileStarterProject(c *gin.Context) {
177177 if starterProject .Name == starterProjectName {
178178 // TODO: Add fetch start project and set response source.
179179
180+ if starterProject .Git != nil {
181+ // TODO: Add fetch starter project zip from git repository source.
182+ } else if starterProject .Zip != nil {
183+ // TODO: Add fetch starter project zip from url source.
184+ } else {
185+ c .JSON (http .StatusBadRequest , gin.H {
186+ "status" : fmt .Sprintf ("Starter project %s has no source to download from" , starterProjectName ),
187+ })
188+ return
189+ }
190+
180191 c .JSON (http .StatusAccepted , gin.H {})
181192 return
182193 }
You can’t perform that action at this time.
0 commit comments