ssh,tunnel: Reduce the amount of application fields fetched

Halves the amout of application data retrieved.

Change-type: patch
This commit is contained in:
Thodoris Greasidis 2023-05-20 00:20:24 +03:00
parent 2e37536e7a
commit 05a96fa60e

View File

@ -298,7 +298,9 @@ export async function getOnlineTargetDeviceUuid(
try {
logger.logDebug(`Fetching fleet ${fleetOrDevice}`);
const { getApplication } = await import('./sdk');
return await getApplication(sdk, fleetOrDevice);
return await getApplication(sdk, fleetOrDevice, {
$select: ['id', 'slug'],
});
} catch (err) {
const { BalenaApplicationNotFound } = await import('balena-errors');
if (instanceOf(err, BalenaApplicationNotFound)) {