Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-Santana-j committed Apr 26, 2024
1 parent 5e4bb85 commit a9e4e98
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
node_modules


/config/web-config.js
/config/*
config/web-config.js
config
7 changes: 1 addition & 6 deletions functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,7 @@ module.exports = {
let time = (parseFloat(server.err.response.data.retry_after) * 1000)
return setTimeout(async () => {
let newServer = await functions(token)
if (newServer.error) {
await verifyServer(newServer)
} else {
resolve(newServer)
}

resolve(newServer)
}, time)

} else {
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ app.get('/dashboard', async (req, res) => {
if (req.session.uid) {
let user = await db.findOne({ colecao: 'users', doc: req.session.uid })
let server = await functions.reqServerByTime(user, functions.findServers)
if (server.error) {
res.redirect('/')
return
}
let servidoresEnd = []
for (let i = 0; i < server.length; i++) {
let element = server[i]
Expand Down

0 comments on commit a9e4e98

Please sign in to comment.