This commit is contained in:
rxdn 2022-06-05 02:57:17 +01:00
parent e649707b15
commit e08448b227

View File

@ -208,7 +208,11 @@
} }
async function createPanel() { async function createPanel() {
const res = await axios.post(`${API_URL}/api/${guildId}/panels`, panelCreateData); let mapped = panels = panelCreateData.map((p) => Object.assign({}, p, {
form_id: p.form_id === "null" ? null : parseInt(p.form_id)
}));
const res = await axios.post(`${API_URL}/api/${guildId}/panels`, mapped);
if (res.status !== 200) { if (res.status !== 200) {
notifyError(res.data.error); notifyError(res.data.error);
return; return;