1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Make API calls relative

This commit is contained in:
ivaosthu 2016-12-27 13:00:07 +01:00
parent e7fbf227a6
commit 1291a664b7
7 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
import { throwIfNotSuccess, headers } from './helper';
const URI = '/api/client/applications';
const URI = 'api/client/applications';
function fetchAll () {
return fetch(URI, { headers })

View File

@ -1,6 +1,6 @@
import { throwIfNotSuccess, headers } from './helper';
const URI = '/api/archive';
const URI = 'api/archive';
function fetchAll () {
return fetch(`${URI}/features`)

View File

@ -1,6 +1,6 @@
import { throwIfNotSuccess, headers } from './helper';
const URI = '/api/client/instances';
const URI = 'api/client/instances';
function fetchAll () {
return fetch(URI, { headers })

View File

@ -1,7 +1,7 @@
import { throwIfNotSuccess, headers } from './helper';
const URI = '/api/features';
const URI_VALIDATE = '/api/features-validate';
const URI = 'api/features';
const URI_VALIDATE = 'api/features-validate';
function validateToggle (featureToggle) {
return new Promise((resolve, reject) => {

View File

@ -1,6 +1,6 @@
const { throwIfNotSuccess } = require('./helper');
const URI = '/api/client/metrics/feature-toggles';
const URI = 'api/client/metrics/feature-toggles';
function fetchFeatureMetrics () {
return fetch(URI)
@ -8,7 +8,7 @@ function fetchFeatureMetrics () {
.then(response => response.json());
}
const seenURI = '/api/client/seen-apps';
const seenURI = 'api/client/seen-apps';
function fetchSeenApps () {
return fetch(seenURI)

View File

@ -1,6 +1,6 @@
import { throwIfNotSuccess } from './helper';
const URI = '/api/events';
const URI = 'api/events';
function fetchAll () {
return fetch(URI)

View File

@ -1,6 +1,6 @@
import { throwIfNotSuccess, headers } from './helper';
const URI = '/api/strategies';
const URI = 'api/strategies';
function fetchAll () {
return fetch(URI)