Fix error if the query parameter is not defined
This commit is contained in:
parent
b2e121aa8e
commit
18da6ddcc1
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
|
|
||||||
// See if we are adding the user's conversion table to the response
|
// See if we are adding the user's conversion table to the response
|
||||||
let users: {[index: string]: string} = {};
|
let users: {[index: string]: string} = {};
|
||||||
if (convert_ids.toLowerCase() === `true` && config.guilds[gID].bot_token) {
|
if (convert_ids?.toLowerCase() === `true` && config.guilds[gID].bot_token) {
|
||||||
for (var k in db[gID].bracket.users) {
|
for (var k in db[gID].bracket.users) {
|
||||||
let r = await axios.get(
|
let r = await axios.get(
|
||||||
`${DISCORD_API_URI}/users/${k}`,
|
`${DISCORD_API_URI}/users/${k}`,
|
||||||
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
|
|
||||||
return h.response({
|
return h.response({
|
||||||
db: db[gID].bracket,
|
db: db[gID].bracket,
|
||||||
user_conversion: users
|
user_id_mapping: users,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue