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