Fix some cases of [object Object]

This commit is contained in:
rxdn 2021-03-05 18:47:05 +00:00
parent b875ad11ed
commit e8a0d58675

View File

@ -444,11 +444,11 @@
async function fillPanels(channels) { async function fillPanels(channels) {
const res = await axios.get('/api/{{.guildId}}/panels'); const res = await axios.get('/api/{{.guildId}}/panels');
if (res.status !== 200) { if (res.status !== 200) {
notifyError(res.data); notifyError(res.data.error);
return 0; return 0;
} }
for (const panel of res.data) { for (const panel of res.data.error) {
appendPanel(panel, channels); appendPanel(panel, channels);
} }
@ -461,7 +461,7 @@
async function fillMultiPanels() { async function fillMultiPanels() {
const res = await axios.get('/api/{{.guildId}}/multipanels'); const res = await axios.get('/api/{{.guildId}}/multipanels');
if (res.status !== 200) { if (res.status !== 200) {
notifyError(res.data); notifyError(res.data.error);
return; return;
} }
@ -496,7 +496,7 @@
// roles // roles
const res = await axios.get('/api/{{.guildId}}/roles'); const res = await axios.get('/api/{{.guildId}}/roles');
if (res.status !== 200 || !res.data.success) { if (res.status !== 200 || !res.data.success) {
notifyError(res.data); notifyError(res.data.error);
return; return;
} }
@ -523,7 +523,7 @@
const res = await axios.get('/api/{{.guildId}}/team'); const res = await axios.get('/api/{{.guildId}}/team');
if (res.status !== 200) { if (res.status !== 200) {
notifyError(res.data); notifyError(res.data.error);
return; return;
} }