Acortar codigo
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
b691bf2cf4
commit
d9445f72e3
|
@ -72,22 +72,14 @@ const getConnections = async () => {
|
|||
return;
|
||||
}
|
||||
|
||||
const formattedConnections = data
|
||||
.map(connection => {
|
||||
const { visitUser = {}, ...rest } = connection;
|
||||
|
||||
const { visitAccess, user, stamp } = visitUser;
|
||||
const { visitAgent } = visitAccess || {};
|
||||
|
||||
return {
|
||||
...rest,
|
||||
user,
|
||||
stamp,
|
||||
visitAgent
|
||||
};
|
||||
})
|
||||
.filter(connection => connection.user);
|
||||
connections.value = formattedConnections;
|
||||
connections.value = data
|
||||
.map(({ visitUser = {}, ...rest }) => ({
|
||||
...rest,
|
||||
user: visitUser.user,
|
||||
stamp: visitUser.stamp,
|
||||
visitAgent: visitUser.visitAccess?.visitAgent
|
||||
}))
|
||||
.filter(({ user }) => user);
|
||||
} catch (error) {
|
||||
console.error('Error getting connections:', error);
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue