Skip to content

Commit

Permalink
Merge pull request #1214 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
api fixes
  • Loading branch information
JohnDuprey authored Jan 11, 2025
2 parents b908165 + 3c1610c commit 15c42e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ function Invoke-ExecCippFunction {
if (Get-Command -Module CIPPCore -Name $Function -and $BlockList -notcontains $Function) {
try {
$Results = & $Function @Params
if (!$Results) {
$Results = "Function $Function executed successfully"
}
$StatusCode = [HttpStatusCode]::OK
} catch {
$Results = $_.Exception.Message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ Function Invoke-AddIntuneTemplate {

$body = [pscustomobject]@{'Results' = 'Successfully added template' }
} else {
$TenantFilter = $Request.Query.tenantFilter
$URLName = $Request.Query.URLName
$ID = $Request.Query.id
$TenantFilter = $Request.Body.tenantFilter ?? $Request.Query.tenantFilter
$URLName = $Request.Body.URLName ?? $Request.Query.URLName
$ID = $Request.Body.ID ?? $Request.Query.ID
$Template = New-CIPPIntuneTemplate -TenantFilter $TenantFilter -URLName $URLName -ID $ID
Write-Host "Template: $Template"
$object = [PSCustomObject]@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Function Invoke-ListIntuneTemplates {
$data | Add-Member -NotePropertyName 'displayName' -NotePropertyValue $_.Displayname -Force
$data | Add-Member -NotePropertyName 'description' -NotePropertyValue $_.Description -Force
$data | Add-Member -NotePropertyName 'Type' -NotePropertyValue $_.Type -Force
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.RowKey -Force
$data
} | Sort-Object -Property displayName
}
Expand Down
3 changes: 2 additions & 1 deletion Modules/CIPPCore/Public/Get-CIPPTimerFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ function Get-CIPPTimerFunctions {
Parameters = $Orchestrator.Parameters ?? @{}
Cron = $CronString
NextOccurrence = $NextOccurrence.ToUniversalTime()
LastOccurrence = $Status.LastOccurrence.DateTime
LastOccurrence = $Status.LastOccurrence
Status = $Status.Status
OrchestratorId = $Status.OrchestratorId
RunOnProcessor = $Orchestrator.RunOnProcessor
IsSystem = $Orchestrator.IsSystem ?? $false
PreferredProcessor = $Orchestrator.PreferredProcessor ?? ''
ErrorMsg = $Status.ErrorMsg ?? ''
}
}
} else {
Expand Down

0 comments on commit 15c42e7

Please sign in to comment.