Fix getting Splatfest IDs

This commit is contained in:
Samuel Elliott 2022-11-07 19:25:40 +00:00
parent aeda7726cd
commit 54092c94fc
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -1,6 +1,10 @@
import fs from 'fs/promises';
import DataUpdater from "./DataUpdater.mjs";
function getFestId(id) {
return Buffer.from(id, 'base64').toString().match(/^Fest-[A-Z]+:(.+)$/)?.[1] ?? id;
}
function generateFestUrl(id) {
return process.env.DEBUG ?
`https://s.nintendo.com/av5ja-lp1/znca/game/4834290508791808?p=/fest_record/${id}` :