mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-19 01:44:51 +00:00
Split JS files
Reorganise Accounts page Shrink filter options on mobile
This commit is contained in:
parent
f83a9b74e5
commit
26ce573726
7 changed files with 121 additions and 123 deletions
19
TFR/server/static/js/sessions.js
Normal file
19
TFR/server/static/js/sessions.js
Normal 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'));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue