We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cfccd0 commit d5ab69dCopy full SHA for d5ab69d
src/api/Api.js
@@ -49,15 +49,15 @@ class Api {
49
}
50
}));
51
})
52
- .catch(err => console.error(err));
+ .catch(err => reject(err));
53
});
54
55
/**
56
* Returns promise with all sites in given category
57
* @param category
58
* @returns {Promise}
59
*/
60
- static getSites = (category) => Firebase.database().ref(`/Sites/${category}`).once('value')
+ static getSites = category => Firebase.database().ref(`/Sites/${category}`).once('value')
61
.then(snapshot => snapshot.val());
62
63
@@ -66,6 +66,6 @@ class Api {
66
67
static getCategories = () => Firebase.database().ref('/Categories').once('value')
68
69
-};
+}
70
71
export default Api;
0 commit comments