Commit e8ee9565 authored by Clement Ho's avatar Clement Ho

[skip ci] remove promise from fetch as it was unused

parent 588f625d
......@@ -38,18 +38,14 @@ export default class SidebarMediator {
}
fetch() {
return new Promise((resolve, reject) => {
this.service.get()
.then((response) => {
const data = response.json();
this.store.processUserData(data);
this.store.processTimeTrackingData(data);
return resolve();
})
.catch(() => {
reject();
return new Flash('Error occured when fetching sidebar data');
});
});
this.service.get()
.then((response) => {
const data = response.json();
this.store.processUserData(data);
this.store.processTimeTrackingData(data);
})
.catch(() => {
return new Flash('Error occured when fetching sidebar data');
});
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment