Skip to content

Commit

Permalink
Merge pull request #13 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
[pull] dev from KelvinTegelaar:dev
  • Loading branch information
pull[bot] authored Jan 21, 2025
2 parents fccf081 + ff27ec9 commit 2a6aeee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Function Invoke-ExecRestoreBackup {
$ht2 = @{}
$line.psobject.properties | ForEach-Object { $ht2[$_.Name] = [string]$_.Value }
$Table.Entity = $ht2
Add-CIPPAzDataTableEntity @Table -Force
Add-AzDataTableEntity @Table -Force
}
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Created backup' -Sev 'Debug'

Expand Down
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 @@ -15,10 +15,10 @@ Function Invoke-listStandardTemplates {
$Templates = (Get-CIPPAzDataTableEntity @Table -Filter $Filter) | ForEach-Object {
$JSON = $_.JSON
try {
$RowKey = $_.RowKey
$data = $_.JSON | ConvertFrom-Json -Depth 100 -ErrorAction SilentlyContinue
} catch {
Write-Host "Could not load standard template: $($_.Exception.Message). Content of the template is: $($JSON)."
Write-Host "Template GUID: $($_.GUID)"
Write-Host "$($RowKey)"
return
}
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force
Expand Down

0 comments on commit 2a6aeee

Please sign in to comment.