mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
b176d63f56
* Fix some optimization bailouts * Use prop-types package * Make error comp functional * Remove unused css transition dep * Remove unused immutability helper dep * Align react versions in package.json
23 lines
533 B
JavaScript
23 lines
533 B
JavaScript
import { throwIfNotSuccess } from './helper';
|
|
|
|
const URI = 'api/admin/metrics/feature-toggles';
|
|
|
|
function fetchFeatureMetrics() {
|
|
return fetch(URI, { credentials: 'include' })
|
|
.then(throwIfNotSuccess)
|
|
.then(response => response.json());
|
|
}
|
|
|
|
const seenURI = 'api/admin/metrics/seen-apps';
|
|
|
|
function fetchSeenApps() {
|
|
return fetch(seenURI, { credentials: 'include' })
|
|
.then(throwIfNotSuccess)
|
|
.then(response => response.json());
|
|
}
|
|
|
|
export default {
|
|
fetchFeatureMetrics,
|
|
fetchSeenApps,
|
|
};
|