Split JS files

Reorganise Accounts page
Shrink filter options on mobile
This commit is contained in:
Michał Gdula 2023-06-13 00:40:13 +03:00
parent f83a9b74e5
commit 26ce573726
7 changed files with 121 additions and 123 deletions

View file

@ -0,0 +1,19 @@
function yeetSession(id) {
let form = new FormData();
form.append('session_id', id);
fetch('/api/tokens', {
method: 'POST',
body: form,
})
.then(response => response.json())
.then(data => {
if (data.success) {
addFlashMessage(data.success, 'success');
document.querySelector(`#sess-${id}`).remove();
} else {
addFlashMessage(data.error, 'error');
}
})
.catch(error => addFlashMessage(error.error, 'error'));
}