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

View File

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