url encode tag id

This commit is contained in:
Dot-Rar 2020-05-14 19:56:18 +01:00
parent 7e431cffd7
commit 740f058a18

View File

@ -87,7 +87,7 @@
} }
async function deleteTag(id) { async function deleteTag(id) {
const res = await axios.delete('/api/{{.guildId}}/tags/' + id); const res = await axios.delete('/api/{{.guildId}}/tags/' + encodeURI(id));
if (res.status === 200 && res.data.success) { if (res.status === 200 && res.data.success) {
const tr = document.getElementById(id); const tr = document.getElementById(id);
tr.parentNode.removeChild(tr); tr.parentNode.removeChild(tr);