fixed id length

This commit is contained in:
4N0N_H4X0R||Emily
2022-04-23 13:16:37 +02:00
committed by GitHub
parent 2541df1da1
commit 1daa075120
+3 -2
View File
@@ -1,6 +1,6 @@
const https = require("http") const https = require("http")
module.exports = class userdb{ module.exports = class watchfox{
#token // Private Field #token // Private Field
constructor(token){ constructor(token){
if(token && token.trim() != ""){ if(token && token.trim() != ""){
@@ -19,9 +19,10 @@ module.exports = class userdb{
return new Promise(async resolve => { return new Promise(async resolve => {
if(!this.#token) if(!this.#token)
resolve("You need to specify your token in the constructor") resolve("You need to specify your token in the constructor")
if(userid == undefined || userid.length < 18 || userid.length > 20){ if(userid == undefined || userid.length < 16 || userid.length > 20){
resolve("You need to supply a valid user id") resolve("You need to supply a valid user id")
} }
// // https://watchfox.kitsunes.eu:2544/dataHandling?function=get_score&token=${this.#token}&userid=${userid}
const options = { const options = {
hostname: 'watchfox.kitsunes.eu', hostname: 'watchfox.kitsunes.eu',
port:2544, port:2544,