mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01: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,
 | 
						|
};
 |