mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-03 01:18:43 +02:00
23 lines
492 B
JavaScript
23 lines
492 B
JavaScript
import { throwIfNotSuccess, headers } from './helper';
|
|
|
|
const URI = 'api/admin/archive';
|
|
|
|
function fetchAll() {
|
|
return fetch(`${URI}/features`, { credentials: 'include' })
|
|
.then(throwIfNotSuccess)
|
|
.then(response => response.json());
|
|
}
|
|
|
|
function revive(featureName) {
|
|
return fetch(`${URI}/revive/${featureName}`, {
|
|
method: 'POST',
|
|
headers,
|
|
credentials: 'include',
|
|
}).then(throwIfNotSuccess);
|
|
}
|
|
|
|
export default {
|
|
fetchAll,
|
|
revive,
|
|
};
|