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 { ...@@ -38,18 +38,14 @@ export default class SidebarMediator {
} }
fetch() { fetch() {
return new Promise((resolve, reject) => { this.service.get()
this.service.get() .then((response) => {
.then((response) => { const data = response.json();
const data = response.json(); this.store.processUserData(data);
this.store.processUserData(data); this.store.processTimeTrackingData(data);
this.store.processTimeTrackingData(data); })
return resolve(); .catch(() => {
}) return new Flash('Error occured when fetching sidebar data');
.catch(() => { });
reject();
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