From 169c5ca8406c2a38ba5abcf1ea49a5872d9f9f2f Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Tue, 24 Jun 2025 19:20:48 -0400 Subject: [PATCH] Update StackMonkey.ps1 --- StackMonkey.ps1 | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/StackMonkey.ps1 b/StackMonkey.ps1 index 1bf89d0..58c670b 100644 --- a/StackMonkey.ps1 +++ b/StackMonkey.ps1 @@ -80,19 +80,7 @@ [string] $N8nPassword, # Datto headless mode - [Parameter(Mandatory,ParameterSetName='Datto')] - #[ValidateNotNullOrEmpty()] - [string] $DattoApiUrl, - - [Parameter(Mandatory,ParameterSetName='Datto')] - #[ValidateNotNullOrEmpty()] - [string] $DattoApiKey, - - [Parameter(Mandatory,ParameterSetName='Datto')] - #[ValidateNotNullOrEmpty()] - [string] $DattoApiSecretKey, - - + [Parameter(Mandatory,ParameterSetName='Datto')] #[ValidateNotNullOrEmpty()] [string] $SiteUID, @@ -165,14 +153,9 @@ switch ($PSCmdlet.ParameterSetName) { # 1) Fetch URL, Key & Secret from n8n webhook # (this is your lines 415-424) # ──────────────────────────────────────────── - try { - $creds = Get-DattoApiCredentials -Password $N8nPassword - if (-not $creds) { - throw "Failed to retrieve Datto API credentials from n8n" - } - + # 1) Fetch creds - $creds = Get-DattoApiCredentials -Password $N8nPassword + $resp = Get-DattoApiCredentials -Password $N8nPassword if (-not $creds) { throw "Could not fetch creds" } # 2) Store in globals for everyone else