Fix linting errors in home component

This commit is contained in:
Torjus Håkestad 2021-04-11 12:08:58 +02:00
parent 49493cec76
commit 65fb8254f5

View File

@ -56,9 +56,13 @@ interface TotalStatsResult {
@Component @Component
export default class Home extends Vue { export default class Home extends Vue {
totalLoginAttempts?: number; totalLoginAttempts?: number;
uniquePasswords?: number; uniquePasswords?: number;
uniqueUsernames?: number; uniqueUsernames?: number;
uniqueIPs?: number; uniqueIPs?: number;
uniqueCountries?: number; uniqueCountries?: number;
ready = false; ready = false;
@ -69,21 +73,21 @@ export default class Home extends Vue {
.get<TotalStatsResult[]>(url) .get<TotalStatsResult[]>(url)
.then((resp) => { .then((resp) => {
this.totalLoginAttempts = resp.data.find( this.totalLoginAttempts = resp.data.find(
(e) => e.name == 'TotalLoginAttempts', (e) => e.name === 'TotalLoginAttempts',
)?.count; )?.count;
this.uniquePasswords = resp.data.find( this.uniquePasswords = resp.data.find(
(e) => e.name == 'UniquePasswords', (e) => e.name === 'UniquePasswords',
)?.count; )?.count;
this.uniqueUsernames = resp.data.find( this.uniqueUsernames = resp.data.find(
(e) => e.name == 'UniqueUsernames', (e) => e.name === 'UniqueUsernames',
)?.count; )?.count;
this.uniqueIPs = resp.data.find((e) => e.name == 'UniqueIPs')?.count; this.uniqueIPs = resp.data.find((e) => e.name === 'UniqueIPs')?.count;
this.uniqueCountries = resp.data.find( this.uniqueCountries = resp.data.find(
(e) => e.name == 'UniqueCountries', (e) => e.name === 'UniqueCountries',
)?.count; )?.count;
this.ready = true; this.ready = true;