fixed trackme not working correctly
This commit is contained in:
@@ -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]
|
||||
|
Reference in New Issue
Block a user