Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api fixes #1214

Merged
merged 5 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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