log less useless informations

This commit is contained in:
Jean Ouina 2020-07-05 16:12:46 +02:00
parent dee3b934c6
commit 20b3d1448f
2 changed files with 2 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -83,7 +83,7 @@ export default new class DistantServer {
})
}
const responseBody = await res.json()
console.log(responseBody)
for(let user of responseBody){
let promise = users.find(promise => promise[0] === user.user_id)
promise[1](user.badges)
@ -116,10 +116,8 @@ export default new class DistantServer {
const handleRequest = function(route, method, data){
if(!settingsCookie["lightcord-5"]){
console.warn(`Canceling request on ${route} with method ${method} and body`, data, "because of settings.")
return Promise.reject(new LightcordError("The current settings blocked the request."))
}
console.log(`Sending request on ${route} with method ${method} and body`, data)
return nodeFetch(`${Constants.SERVER_URL}/api/v1${route}`, {
method,
headers: {
@ -136,7 +134,6 @@ class LightcordError extends Error {
constructor(){
super(...arguments)
this.name = "LightcordError"
}
}