From 38289b4091bad0f1e483d65e8fa41457e827a3ea Mon Sep 17 00:00:00 2001 From: cnachtigall1991 <40701475+cnachtigall1991@users.noreply.github.com> Date: Wed, 13 Oct 2021 18:37:37 +0200 Subject: [PATCH] fixed trackme not working correctly --- src/utils/Utils.js | 4 ++-- src/views/Player.vue | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 36ebdc8..84a1ead 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -17,12 +17,12 @@ export const TrackMe = async (id64, authcode, sharecode) => { const shareCodeRegex = /^CSGO(?:-?[ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijkmnopqrstuvwxyz23456789]{5}){5}$/ const authCodeRegex = /^[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{4}-[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{5}-[ABCDEFGHJKLMNOPQRSTUVWXYZ23456789]{4}$/ - if (!shareCodeRegex.test(sharecode)) { + if (sharecode && !shareCodeRegex.test(sharecode)) { statusError = 'Is not a valid sharecode' status = 418 return [status, statusError] } - if (!authCodeRegex.test(authcode)) { + if (authcode === '' || !authCodeRegex.test(authcode)) { statusError = 'Is not a valid authcode' status = 418 return [status, statusError] diff --git a/src/views/Player.vue b/src/views/Player.vue index 281f4c0..ed9d0d8 100644 --- a/src/views/Player.vue +++ b/src/views/Player.vue @@ -44,13 +44,13 @@ -