MarseyWorld/files/assets/js/submit_hats.js

26 lines
603 B
JavaScript
Raw Normal View History

function approve_hat(t) {
const name = t.dataset.name
postToast(t, `/admin/approve/hat/${name}`,
{
"description": document.getElementById(`${name}-description`).value,
"name": document.getElementById(`${name}-name`).value,
"price": document.getElementById(`${name}-price`).value,
},
() => {
document.getElementById(`${name}-hat`).remove()
}
);
}
function remove_hat(t) {
const name = t.dataset.name
postToast(t, `/remove/hat/${name}`,
{
2023-09-29 07:59:27 +00:00
"reason": document.getElementById(`${name}-reason`).value,
},
() => {
document.getElementById(`${name}-hat`).remove()
}
);
}