From ecbc660bf50a2d0cdc1f69e6646a816df18ea247 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Sat, 20 May 2023 01:04:22 +0300 Subject: [PATCH] Fetch only the app slug when resolving an app by name Affects many env & tags commands, as well as support, releases & preload. Change-type: patch --- lib/utils/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/sdk.ts b/lib/utils/sdk.ts index dd1bb32e..7d0a4094 100644 --- a/lib/utils/sdk.ts +++ b/lib/utils/sdk.ts @@ -76,7 +76,7 @@ export async function getFleetSlug( if (!looksLikeFleetSlug(nameOrSlug)) { // Not a slug: must be an app name. // TODO: revisit this logic when we add support for fleet UUIDs. - return (await getApplication(sdk, nameOrSlug)).slug; + return (await getApplication(sdk, nameOrSlug, { $select: 'slug' })).slug; } return nameOrSlug.toLowerCase(); }