Sort IP addresses by ban time

This commit is contained in:
2021-06-14 14:55:34 +02:00
parent 8c4c472a14
commit d1fb97c9b9
3 changed files with 1020 additions and 9 deletions

View File

@@ -17,7 +17,10 @@ const get_bans = async () => {
if(resp.status >= 400) {
throw new Error(resp.text());
}
rows = await resp.json();
rows = await resp.json()
rows.sort((a, b) => {
return b.ban_time.localeCompare(a.ban_time)
});
} catch (err) {
alert(err);
} finally {