Add eslint and style fix

This commit is contained in:
Alex Ling
2022-08-19 11:40:41 +00:00
parent e4af194d0c
commit 28c098a56e
19 changed files with 1795 additions and 1677 deletions

View File

@@ -1,16 +1,17 @@
const remove = (username) => {
$.ajax({
url: `${base_url}api/admin/user/delete/${username}`,
type: 'DELETE',
dataType: 'json'
})
.done(data => {
if (data.success)
location.reload();
else
alert('danger', data.error);
})
.fail((jqXHR, status) => {
alert('danger', `Failed to delete the user. Error: [${jqXHR.status}] ${jqXHR.statusText}`);
});
$.ajax({
url: `${base_url}api/admin/user/delete/${username}`,
type: 'DELETE',
dataType: 'json',
})
.done((data) => {
if (data.success) location.reload();
else alert('danger', data.error);
})
.fail((jqXHR, status) => {
alert(
'danger',
`Failed to delete the user. Error: [${jqXHR.status}] ${jqXHR.statusText}`,
);
});
};