Merge pull request #180 from OpzekerIT/dev

latestmatches fix
This commit is contained in:
Lanta 2024-10-29 09:32:54 +01:00 committed by GitHub
commit 497810f8c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,7 +110,7 @@ $player_matches_object = @()
foreach ($file in $matchfiles) {
$filecontent = get-content $file | convertfrom-json
$matchfiledate = $filecontent.data.attributes.createdAt
if ($matchfiledate -lt (get-date).AddMonths(-1)) {
if ($matchfiledate -lt (get-date).AddMonths(-3)) {
write-output "archiving $matchfiledate"
Move-Item -Path $file -Destination "$scriptroot/../data/matches/archive"
}