Skip to content

Commit 8f5ae25

Browse files
committed
rename apis
1 parent 288c9ef commit 8f5ae25

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Invoke-ExecAppDeploymentTemplate {
1+
function Invoke-ExecAppApprovalTemplate {
22
<#
33
.FUNCTIONALITY
44
Entrypoint,AnyTenant
@@ -39,12 +39,12 @@ function Invoke-ExecAppDeploymentTemplate {
3939
# Convert to JSON, preserving the original structure
4040
$templateJson = $templateObject | ConvertTo-Json -Depth 10 -Compress
4141

42-
# Add to templates table with AppDeploymentTemplate partition key
42+
# Add to templates table with AppApprovalTemplate partition key
4343
$Table.Force = $true
4444
Add-CIPPAzDataTableEntity @Table -Entity @{
4545
JSON = [string]$templateJson
4646
RowKey = "$GUID"
47-
PartitionKey = 'AppDeploymentTemplate'
47+
PartitionKey = 'AppApprovalTemplate'
4848
}
4949

5050
# Return a proper array with ONE element containing the TemplateId
@@ -71,7 +71,7 @@ function Invoke-ExecAppDeploymentTemplate {
7171
$TemplateId = $Request.Body.TemplateId
7272

7373
# Get the template to delete
74-
$Template = Get-CIPPAzDataTableEntity @Table -Filter "PartitionKey eq 'AppDeploymentTemplate' and RowKey eq '$TemplateId'"
74+
$Template = Get-CIPPAzDataTableEntity @Table -Filter "PartitionKey eq 'AppApprovalTemplate' and RowKey eq '$TemplateId'"
7575

7676
if ($Template) {
7777
$TemplateData = $Template.JSON | ConvertFrom-Json
@@ -98,10 +98,10 @@ function Invoke-ExecAppDeploymentTemplate {
9898
}
9999
'Get' {
100100
# Check if TemplateId is provided to filter results
101-
$filter = "PartitionKey eq 'AppDeploymentTemplate'"
101+
$filter = "PartitionKey eq 'AppApprovalTemplate'"
102102
if ($Request.Query.TemplateId) {
103103
$templateId = $Request.Query.TemplateId
104-
$filter = "PartitionKey eq 'AppDeploymentTemplate' and RowKey eq '$templateId'"
104+
$filter = "PartitionKey eq 'AppApprovalTemplate' and RowKey eq '$templateId'"
105105
Write-LogMessage -headers $Request.Headers -API $APIName -message "Retrieved specific template: $templateId" -Sev 'Info'
106106
}
107107

@@ -125,7 +125,7 @@ function Invoke-ExecAppDeploymentTemplate {
125125
}
126126
default {
127127
# Default action - list all templates
128-
$filter = "PartitionKey eq 'AppDeploymentTemplate'"
128+
$filter = "PartitionKey eq 'AppApprovalTemplate'"
129129

130130
$Templates = Get-CIPPAzDataTableEntity @Table -Filter $filter
131131

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Invoke-ListAppDeploymentTemplates {
1+
function Invoke-ListAppApprovalTemplates {
22
<#
33
.FUNCTIONALITY
44
Entrypoint,AnyTenant
@@ -15,8 +15,8 @@ function Invoke-ListAppDeploymentTemplates {
1515
$Table = Get-CIPPTable -TableName 'templates'
1616

1717
try {
18-
# Use the templates table with AppDeploymentTemplate partition key
19-
$filter = "PartitionKey eq 'AppDeploymentTemplate'"
18+
# Use the templates table with AppApprovalTemplate partition key
19+
$filter = "PartitionKey eq 'AppApprovalTemplate'"
2020

2121
$Templates = Get-CIPPAzDataTableEntity @Table -Filter $filter
2222

0 commit comments

Comments
 (0)