fix account id validation
This commit is contained in:
parent
83b0833c8d
commit
c2877d8df7
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user