service token create - change env to slug

This commit is contained in:
Maidul Islam
2023-01-15 19:29:14 -08:00
parent b3816bd828
commit cf123d1887

View File

@@ -68,13 +68,16 @@ const AddServiceTokenDialog = ({
plaintext: key,
key: randomBytes,
});
console.log(1234, selectedServiceTokenEnv, environments, selectedServiceTokenEnv?.slug
? selectedServiceTokenEnv.slug
: environments[0]?.slug)
const newServiceToken = await addServiceToken({
name: serviceTokenName,
workspaceId,
environment: selectedServiceTokenEnv?.slug
? selectedServiceTokenEnv.slug
: environments[0]?.name,
: environments[0]?.slug,
expiresIn:
expiryMapping[serviceTokenExpiresIn as keyof typeof expiryMapping],
encryptedKey: ciphertext,