Update client to 0.2.54 and fix breaking changes
parent
cfc9f1e3ab
commit
8f9015c9b2
|
@ -985,9 +985,9 @@
|
|||
}
|
||||
},
|
||||
"@influxdata/influx": {
|
||||
"version": "0.2.53",
|
||||
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.53.tgz",
|
||||
"integrity": "sha512-xOTUkDMyjT5G1yKLWt2U7FFhlmABStZtdAuMnq49CnsXxPokrWmVFcfZ0vtXTtlQLK6cdjpE/UY/N5MACBjYmQ==",
|
||||
"version": "0.2.54",
|
||||
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.54.tgz",
|
||||
"integrity": "sha512-KDVe8ZYeNA/Ii9P9USWW28n4fES9ydQ2rrrQXzOqfqUQu2wkXDNluIKtMdjqJ0zwhqlc0v3hSSYGxPCHOIATEA==",
|
||||
"requires": {
|
||||
"axios": "^0.18.0"
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@influxdata/clockface": "0.0.8",
|
||||
"@influxdata/influx": "0.2.53",
|
||||
"@influxdata/influx": "0.2.54",
|
||||
"@influxdata/react-custom-scrollbars": "4.3.8",
|
||||
"axios": "^0.18.0",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
|
|
|
@ -117,22 +117,11 @@ export default class Members extends PureComponent<Props, State> {
|
|||
|
||||
private async getUsers() {
|
||||
const {members} = this.props
|
||||
const apiUsers = await client.users.getAll()
|
||||
const allUsers = apiUsers.reduce((acc, u) => _.set(acc, u.id, u), {})
|
||||
const users = _.omit(allUsers, members.map(m => m.id))
|
||||
|
||||
const data = await client.users.getAllUsers()
|
||||
|
||||
const users = {}
|
||||
|
||||
data.users.forEach(key => {
|
||||
users[key.id] = key
|
||||
})
|
||||
|
||||
members.forEach(m => {
|
||||
if (users[m.id]) {
|
||||
delete users[m.id]
|
||||
}
|
||||
})
|
||||
|
||||
this.setState({users: users})
|
||||
this.setState({users})
|
||||
}
|
||||
|
||||
private addMember = async (user: AddResourceMemberRequestBody) => {
|
||||
|
|
Loading…
Reference in New Issue