2022-12-29 14:20:27 +00:00
|
|
|
function approve_hat(t, name) {
|
2023-09-17 20:29:24 +00:00
|
|
|
console.log(name)
|
2023-09-17 20:27:54 +00:00
|
|
|
console.log(`${name}-description`)
|
2022-12-29 14:20:27 +00:00
|
|
|
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, name) {
|
|
|
|
postToast(t, `/remove/hat/${name}`,
|
|
|
|
{
|
|
|
|
},
|
|
|
|
() => {
|
|
|
|
document.getElementById(`${name}-hat`).remove()
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|