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';
|
import { throwIfNotSuccess, headers } from './helper';
|
||||||
|
|
||||||
const URI = '/api/client/applications';
|
const URI = 'api/client/applications';
|
||||||
|
|
||||||
function fetchAll () {
|
function fetchAll () {
|
||||||
return fetch(URI, { headers })
|
return fetch(URI, { headers })
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { throwIfNotSuccess, headers } from './helper';
|
import { throwIfNotSuccess, headers } from './helper';
|
||||||
|
|
||||||
const URI = '/api/archive';
|
const URI = 'api/archive';
|
||||||
|
|
||||||
function fetchAll () {
|
function fetchAll () {
|
||||||
return fetch(`${URI}/features`)
|
return fetch(`${URI}/features`)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { throwIfNotSuccess, headers } from './helper';
|
import { throwIfNotSuccess, headers } from './helper';
|
||||||
|
|
||||||
const URI = '/api/client/instances';
|
const URI = 'api/client/instances';
|
||||||
|
|
||||||
function fetchAll () {
|
function fetchAll () {
|
||||||
return fetch(URI, { headers })
|
return fetch(URI, { headers })
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { throwIfNotSuccess, headers } from './helper';
|
import { throwIfNotSuccess, headers } from './helper';
|
||||||
|
|
||||||
const URI = '/api/features';
|
const URI = 'api/features';
|
||||||
const URI_VALIDATE = '/api/features-validate';
|
const URI_VALIDATE = 'api/features-validate';
|
||||||
|
|
||||||
function validateToggle (featureToggle) {
|
function validateToggle (featureToggle) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const { throwIfNotSuccess } = require('./helper');
|
const { throwIfNotSuccess } = require('./helper');
|
||||||
|
|
||||||
const URI = '/api/client/metrics/feature-toggles';
|
const URI = 'api/client/metrics/feature-toggles';
|
||||||
|
|
||||||
function fetchFeatureMetrics () {
|
function fetchFeatureMetrics () {
|
||||||
return fetch(URI)
|
return fetch(URI)
|
||||||
@ -8,7 +8,7 @@ function fetchFeatureMetrics () {
|
|||||||
.then(response => response.json());
|
.then(response => response.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
const seenURI = '/api/client/seen-apps';
|
const seenURI = 'api/client/seen-apps';
|
||||||
|
|
||||||
function fetchSeenApps () {
|
function fetchSeenApps () {
|
||||||
return fetch(seenURI)
|
return fetch(seenURI)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { throwIfNotSuccess } from './helper';
|
import { throwIfNotSuccess } from './helper';
|
||||||
|
|
||||||
const URI = '/api/events';
|
const URI = 'api/events';
|
||||||
|
|
||||||
function fetchAll () {
|
function fetchAll () {
|
||||||
return fetch(URI)
|
return fetch(URI)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { throwIfNotSuccess, headers } from './helper';
|
import { throwIfNotSuccess, headers } from './helper';
|
||||||
|
|
||||||
const URI = '/api/strategies';
|
const URI = 'api/strategies';
|
||||||
|
|
||||||
function fetchAll () {
|
function fetchAll () {
|
||||||
return fetch(URI)
|
return fetch(URI)
|
||||||
|
Loading…
Reference in New Issue
Block a user