Skip to content

Commit a998f55

Browse files
update execedittemplate
1 parent 189ccf0 commit a998f55

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecEditTemplate.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using namespace System.Net
22

3-
Function Invoke-ExecEditTemplate {
3+
function Invoke-ExecEditTemplate {
44
<#
55
.FUNCTIONALITY
66
Entrypoint,AnyTenant
@@ -18,7 +18,7 @@ Function Invoke-ExecEditTemplate {
1818
$Table = Get-CippTable -tablename 'templates'
1919
$guid = $request.body.guid
2020
$JSON = ConvertTo-Json -Compress -Depth 100 -InputObject ($request.body | Select-Object * -ExcludeProperty GUID)
21-
$Type = $request.Body.Type
21+
$Type = $request.query.Type
2222

2323
if ($Type -eq 'IntuneTemplate') {
2424
Write-Host 'Intune Template'
@@ -28,7 +28,6 @@ Function Invoke-ExecEditTemplate {
2828
Set-CIPPIntuneTemplate -RawJSON $RawJSON -GUID $GUID -DisplayName $Request.body.displayName -Description $Request.body.description -templateType $OriginalTemplate.Type -Headers $Request.Headers
2929
} else {
3030
$Table.Force = $true
31-
3231
Add-CIPPAzDataTableEntity @Table -Entity @{
3332
JSON = "$JSON"
3433
RowKey = "$GUID"

0 commit comments

Comments
 (0)