Add steam id checks
This commit is contained in:
parent
2e85650dfc
commit
864fdf4305
@ -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;
|
||||||
|
Reference in New Issue
Block a user