2023-09-17 20:32:41 +00:00
|
|
|
function approve_hat(t) {
|
|
|
|
const name = t.dataset.name
|
2022-12-29 14:20:27 +00:00
|
|
|
postToast(t, `/admin/approve/hat/${name}`,
|
|
|
|
{
|
2023-10-02 03:40:30 +00:00
|
|
|
"comment": document.getElementById(`${name}-comment`).value,
|
2022-12-29 14:20:27 +00:00
|
|
|
"description": document.getElementById(`${name}-description`).value,
|
|
|
|
"name": document.getElementById(`${name}-name`).value,
|
|
|
|
"price": document.getElementById(`${name}-price`).value,
|
|
|
|
},
|
|
|
|
() => {
|
|
|
|
document.getElementById(`${name}-hat`).remove()
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-09-17 20:32:41 +00:00
|
|
|
function remove_hat(t) {
|
|
|
|
const name = t.dataset.name
|
2022-12-29 14:20:27 +00:00
|
|
|
postToast(t, `/remove/hat/${name}`,
|
|
|
|
{
|
2023-10-02 03:40:30 +00:00
|
|
|
"comment": document.getElementById(`${name}-comment`).value,
|
2022-12-29 14:20:27 +00:00
|
|
|
},
|
|
|
|
() => {
|
|
|
|
document.getElementById(`${name}-hat`).remove()
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|