latestmatches fix #180
1 changed files with 1 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ $player_matches_object = @()
|
||||||
foreach ($file in $matchfiles) {
|
foreach ($file in $matchfiles) {
|
||||||
$filecontent = get-content $file | convertfrom-json
|
$filecontent = get-content $file | convertfrom-json
|
||||||
$matchfiledate = $filecontent.data.attributes.createdAt
|
$matchfiledate = $filecontent.data.attributes.createdAt
|
||||||
if ($matchfiledate -lt (get-date).AddMonths(-1)) {
|
if ($matchfiledate -lt (get-date).AddMonths(-3)) {
|
||||||
write-output "archiving $matchfiledate"
|
write-output "archiving $matchfiledate"
|
||||||
Move-Item -Path $file -Destination "$scriptroot/../data/matches/archive"
|
Move-Item -Path $file -Destination "$scriptroot/../data/matches/archive"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue