File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ func (App) LsApp(ctx *gin.Context) {
318318type checkBundleReq struct {
319319 AppName * string `json:"appName" binding:"required"`
320320 Deployment * string `json:"deployment" binding:"required"`
321+ Version * string `json:"version" binding:"required"`
321322}
322323
323324func (App ) CheckBundle (ctx * gin.Context ) {
@@ -333,10 +334,19 @@ func (App) CheckBundle(ctx *gin.Context) {
333334 if deployment == nil {
334335 log .Panic ("Deployment " + * checkBundleReq .Deployment + " not found" )
335336 }
337+ var hash * string
338+ if deployment .VersionId != nil {
339+ deployment := model.DeploymentVersion {}.GetByKeyDeploymentIdAndVersion (* deployment .Id , * checkBundleReq .Version )
340+ if deployment != nil {
341+ pack := model .GetOne [model.Package ]("id" , deployment .CurrentPackage )
342+ hash = pack .Hash
343+ }
344+ }
336345
337346 ctx .JSON (http .StatusOK , gin.H {
338347 "appName" : app .AppName ,
339348 "os" : app .OS ,
349+ "hash" : hash ,
340350 })
341351 } else {
342352 log .Panic (err .Error ())
You can’t perform that action at this time.
0 commit comments