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:
parent
e7fbf227a6
commit
1291a664b7
@ -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 })
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { throwIfNotSuccess, headers } from './helper';
|
||||
|
||||
const URI = '/api/archive';
|
||||
const URI = 'api/archive';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(`${URI}/features`)
|
||||
|
@ -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 })
|
||||
|
@ -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) => {
|
||||
|
@ -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)
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { throwIfNotSuccess } from './helper';
|
||||
|
||||
const URI = '/api/events';
|
||||
const URI = 'api/events';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(URI)
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { throwIfNotSuccess, headers } from './helper';
|
||||
|
||||
const URI = '/api/strategies';
|
||||
const URI = 'api/strategies';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(URI)
|
||||
|
Loading…
Reference in New Issue
Block a user