Add getVersion method

This commit is contained in:
Oliver Davies 2019-04-09 02:44:24 +01:00
parent f9bb0bb976
commit 6f0a369038
3 changed files with 6 additions and 2 deletions

View file

@ -271,6 +271,10 @@ export default {
getApplicationType (application) {
return this.getTypes()[application.type]
},
getVersion (type, environment) {
return _(environment).get(`versions.${type}`)
}
}
}

View file

@ -22,7 +22,7 @@ export default {
return null
}
return _.get(this.getEnvironment(this.application.id, 'prod'), 'versions.php')
return this.getVersion('php', this.getEnvironment(this.application.id, 'prod'))
}
}
}

View file

@ -171,7 +171,7 @@ export default {
},
phpVersion: function () {
return _(this.environment).get('versions.php')
return this.getVersion('php', this.environment)
}
}
}