fix account id validation

This commit is contained in:
Lee 2023-01-24 21:31:11 +00:00
parent 83b0833c8d
commit c2877d8df7
No known key found for this signature in database
GPG Key ID: BAF8F4DB8E7F38EF

@ -4,15 +4,15 @@ import Utils from "../utils/utils";
const KEY = "VALID_STEAM_ID_"; const KEY = "VALID_STEAM_ID_";
const TO_CHECK = [ const TO_CHECK = [
LeaderboardType.ScoreSaber.ApiUrl.PlayerData,
LeaderboardType.BeatLeader.ApiUrl.PlayerData, LeaderboardType.BeatLeader.ApiUrl.PlayerData,
LeaderboardType.ScoreSaber.ApiUrl.PlayerData,
]; ];
export async function isValidSteamId(steamId) { export async function isValidSteamId(steamId) {
if (!steamId) { if (!steamId) {
return false; return false;
} }
if (steamId.length !== 17) { if (steamId.length < 15 && steamId.length > 20) {
return false; return false;
} }