Add the release to the status endpoint

Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-02-05 17:32:56 +00:00
parent 769e2f3c51
commit c0e68bb069
No known key found for this signature in database
GPG Key ID: 49690ED87032539F

View File

@ -385,6 +385,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) {
router.get('/v2/state/status', async (_req, res) => {
const localMode = await applications.config.get('localMode');
const currentRelease = await applications.config.get('currentCommit');
const pending = applications.deviceState.applyInProgress;
const containerStates = (await applications.services.getAll()).map(svc =>
@ -432,6 +433,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) {
overallDownloadProgress,
containers: containerStates,
images: imagesStates,
release: currentRelease,
});
});
}