xd
This commit is contained in:
parent
9541d9e0b8
commit
7e1129a567
|
@ -287,6 +287,7 @@ const flash = ({ type, msg }) => {
|
|||
|
||||
textfield.addEventListener("keyup", async e => {
|
||||
if(e.key === 'Enter') {
|
||||
parent.removeChild(textfield);
|
||||
// send
|
||||
let res = await fetch('/api/v2/admin/tags/' + encodeURIComponent(oldtag), {
|
||||
method: 'PUT',
|
||||
|
@ -303,7 +304,7 @@ const flash = ({ type, msg }) => {
|
|||
switch(status) {
|
||||
case 200: // success, change
|
||||
case 201:
|
||||
parent.removeChild(textfield);
|
||||
//parent.removeChild(textfield);
|
||||
parent.insertAdjacentElement('afterbegin', old);
|
||||
parent.querySelector('a:last-child').style.display = '';
|
||||
old.href = `/tag/${res.tag}`;
|
||||
|
|
Loading…
Reference in New Issue
Block a user