- client: change code style of top clients normalization helper

This commit is contained in:
Artem Baskal 2020-01-14 11:09:17 +03:00
parent fb8d23f51b
commit 392535ce3a
1 changed files with 3 additions and 3 deletions

View File

@ -277,11 +277,11 @@ export const normalizeTextarea = text => text && text.replace(/[;, ]/g, '\n').sp
export const normalizeTopClients = topClients => topClients.reduce((nameToCountMap, clientObj) => {
const { name, count, info: { name: infoName } } = clientObj;
// eslint-disable-next-line no-param-reassign
nameToCountMap.auto = { ...nameToCountMap.auto, [name]: count };
nameToCountMap.auto[name] = count;
// eslint-disable-next-line no-param-reassign
nameToCountMap.configured = { ...nameToCountMap.configured, [infoName]: count };
nameToCountMap.configured[infoName] = count;
return nameToCountMap;
}, {});
}, { auto: {}, configured: {} });
export const getClientInfo = (clients, ip) => {
const client = clients