1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/data/feature-metrics-api.js
Simen Bekkhus b176d63f56 Fix deprecations (#88)
* 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
2017-08-28 21:30:12 +02:00

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,
};