Added more tests

This commit is contained in:
Yuriy Kulakov
2021-05-16 20:43:13 +03:00
parent 716af21f48
commit 2f15d74a56
3 changed files with 21 additions and 7 deletions

View File

@@ -120,7 +120,7 @@ export class Table extends React.Component {
};
}
async get_users() {
async getUsers() {
await axios.get("/api/users").then((response) => {
this.setState({
users: response.data.users,
@@ -137,12 +137,12 @@ export class Table extends React.Component {
}
componentDidMount() {
this.get_users().then(() => {})
this.getUsers().then(() => {})
.catch(reason => {
console.log(reason)
});
this.interval = setInterval(() => {
this.get_users().catch(reason => {
this.getUsers().catch(reason => {
console.log(reason)
})
}, 60000);