fix: remove duplicate function definition

This commit is contained in:
Rodweil, Theodor 2023-08-06 04:14:27 +02:00
parent 199dd9870f
commit 885d0dbd4e
No known key found for this signature in database
GPG key ID: F8BC1B0EB1F9CCF5

View file

@ -243,55 +243,6 @@ function Get-PageMeta
} }
function Get-CachedPageMeta
{
<#
.SYNOPSIS
Get a locally indexed/cached Confluence page id
.EXAMPLE
Get-CachedPageMeta `
-Title 'd231cc3422bfdf96.xml' `
-CacheIndexFile 'confluence-page-cache.json'
#>
Param(
[Parameter(Mandatory)] [string] $Title,
[Parameter(Mandatory)] [string] $CacheIndexFile
)
Process
{
try
{
$raw = Get-Content $CacheIndexFile
}
catch
{
$raw = "{}"
}
$data = $raw | ConvertFrom-JSON
try
{
$pageMeta = $data | Select -ExpandProperty $Title
$pageMeta
Write-Debug "page id cache hit: $Title -> $($pageMeta.PageId)"
}
catch
{
$null
Write-Debug "page id cache miss: $Title"
}
}
}
function Register-PageMeta function Register-PageMeta
{ {
<# <#