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

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