Skip to content

Commit

Permalink
add json compress
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jan 21, 2025
1 parent 28908ed commit ff27ec9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function Invoke-ExecStandardConvert {
$Converted | Add-Member -NotePropertyName 'createdAt' -NotePropertyValue ((Get-Date).ToUniversalTime()) -Force
$Converted | Add-Member -NotePropertyName 'updatedBy' -NotePropertyValue 'System' -Force
$Converted | Add-Member -NotePropertyName 'updatedAt' -NotePropertyValue (Get-Date).ToUniversalTime() -Force
$JSON = ConvertTo-Json -Depth 40 -InputObject $Converted
$JSON = ConvertTo-Json -Depth 100 -InputObject $Converted -Compress

$Table = Get-CippTable -tablename 'templates'
$Table.Force = $true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ Function Invoke-listStandardTemplates {
$RowKey = $_.RowKey
$data = $_.JSON | ConvertFrom-Json -Depth 100 -ErrorAction SilentlyContinue
} catch {
Write-Host "Could not load standard template: $($_.Exception.Message)."
Write-Host "Template GUID: $($RowKey)"
Write-Host "$($RowKey)"
return
}
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force
Expand Down

0 comments on commit ff27ec9

Please sign in to comment.