Add steam id checks

This commit is contained in:
Liam 2022-10-19 17:47:30 +01:00
parent 2e85650dfc
commit 864fdf4305
2 changed files with 1 additions and 5 deletions

@ -124,7 +124,7 @@ export default class Home extends Component {
}
async validateSteamId(steamId) {
if (steamId.length < 16) {
if (steamId.length !== 17) {
// Steam ID is invalid
return this.setState({ avatarUrl: undefined });
}
@ -132,8 +132,6 @@ export default class Home extends Component {
const data = await fetch("/api/validateid?steamid=" + steamId);
const json = await data.json();
console.log(json);
if (json.message === "Valid") {
this.setState({
avatarUrl: `/api/steamavatar?steamid=${steamId}`,

@ -282,8 +282,6 @@ export default class Overlay extends Component {
noteFullyCut: (data) => {
const { noteCut } = data;
console.log(noteCut);
// Left Saber
if (noteCut.saberType === "SaberA") {
const data = this.state.leftHand;