Fix create template not testing for errors

This commit is contained in:
jude 2023-07-30 15:36:58 +01:00
parent 9ede879630
commit e63996bb61

View File

@ -823,6 +823,14 @@ $createTemplateBtn.addEventListener("click", async () => {
]; ];
let reminder = await serialize_reminder($createReminder, "template"); let reminder = await serialize_reminder($createReminder, "template");
if (reminder.error) {
show_error(reminder.error);
$createTemplateBtn.querySelector("span.icon > i").classList = [
"fas fa-file-spreadsheet",
];
return;
}
let guild = guildId(); let guild = guildId();
fetch(`/dashboard/api/guild/${guild}/templates`, { fetch(`/dashboard/api/guild/${guild}/templates`, {