Skip to content

Commit

Permalink
Fix rules history script - url did not include /api part of route
Browse files Browse the repository at this point in the history
  • Loading branch information
wicksipedia committed May 10, 2024
1 parent 812e61e commit 4e0ff18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build-scripts/update-latest-rules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param (

$ErrorActionPreference = 'Stop'

$Uri = $AzFunctionBaseUrl + '/UpdateLatestRules'
$Uri = $AzFunctionBaseUrl + '/api/UpdateLatestRules'
$Headers = @{'x-functions-key' = $UpdateLatestRulesFunctionKey }

try {
Expand Down
6 changes: 3 additions & 3 deletions build-scripts/update-rule-history.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cd SSW.Rules.Content/
git commit-graph write --reachable --changed-paths

#Step 1: GetHistorySyncCommitHash - Retrieve CommitHash from AzureFunction
$Uri = $AzFunctionBaseUrl + '/GetHistorySyncCommitHash'
$Uri = $AzFunctionBaseUrl + '/api/GetHistorySyncCommitHash'
$Headers = @{'x-functions-key' = $GetHistorySyncCommitHashKey}
$Response = Invoke-WebRequest -URI $Uri -Headers $Headers
$startCommitHash = $Response.Content -replace '"', ''
Expand Down Expand Up @@ -67,14 +67,14 @@ $historyArray | Foreach-Object {
$historyFileContents = ConvertTo-Json $historyFileArray

#Step 3: UpdateRuleHistory - Send History Patch to AzureFunction
$Uri = $AzFunctionBaseUrl + '/UpdateRuleHistory'
$Uri = $AzFunctionBaseUrl + '/api/UpdateRuleHistory'
$Headers = @{'x-functions-key' = $UpdateRuleHistoryKey}
$Response = Invoke-WebRequest -Uri $Uri -Method Post -Body $historyFileContents -Headers $Headers -ContentType 'application/json; charset=utf-8'

if(![string]::IsNullOrWhiteSpace($commitSyncHash))
{
#Step 4: UpdateHistorySyncCommitHash - Update Commit Hash with AzureFunction
$Uri = $AzFunctionBaseUrl + '/UpdateHistorySyncCommitHash'
$Uri = $AzFunctionBaseUrl + '/api/UpdateHistorySyncCommitHash'
$Headers = @{'x-functions-key' = $UpdateHistorySyncCommitHashKey}
$Body = @{
commitHash = $commitSyncHash
Expand Down

0 comments on commit 4e0ff18

Please sign in to comment.