mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Use updated routes from paths cleanup
This commit is contained in:
parent
a74c71fe17
commit
d82af47a38
@ -1,21 +1,24 @@
|
||||
import { throwIfNotSuccess, headers } from './helper';
|
||||
|
||||
const URI = 'api/client/applications';
|
||||
const URI = 'api/admin/metrics/applications';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(URI, { headers })
|
||||
return fetch(URI, { headers, credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
||||
function fetchApplication (appName) {
|
||||
return fetch(`${URI}/${appName}`, { headers })
|
||||
return fetch(`${URI}/${appName}`, { headers, credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
||||
function fetchApplicationsWithStrategyName (strategyName) {
|
||||
return fetch(`${URI}?strategyName=${strategyName}`, { headers })
|
||||
return fetch(`${URI}?strategyName=${strategyName}`, {
|
||||
headers,
|
||||
credentials: 'include',
|
||||
})
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { throwIfNotSuccess, headers } from './helper';
|
||||
|
||||
const URI = 'api/archive';
|
||||
const URI = 'api/admin/archive';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(`${URI}/features`)
|
||||
return fetch(`${URI}/features`, { credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { throwIfNotSuccess, headers } from './helper';
|
||||
|
||||
const URI = 'api/client/instances';
|
||||
const URI = 'api/admin/metrics/instances';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(URI, { headers })
|
||||
return fetch(URI, { headers, credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { throwIfNotSuccess, headers } from './helper';
|
||||
|
||||
const URI = 'api/features';
|
||||
const URI_VALIDATE = 'api/features-validate';
|
||||
const URI = 'api/admin/features';
|
||||
|
||||
function validateToggle (featureToggle) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -14,7 +13,7 @@ function validateToggle (featureToggle) {
|
||||
}
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(URI)
|
||||
return fetch(URI, { credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
@ -31,7 +30,7 @@ function create (featureToggle) {
|
||||
}
|
||||
|
||||
function validate (featureToggle) {
|
||||
return fetch(URI_VALIDATE, {
|
||||
return fetch(`${URI}/validate`, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
credentials: 'include',
|
||||
|
@ -1,17 +1,17 @@
|
||||
const { throwIfNotSuccess } = require('./helper');
|
||||
|
||||
const URI = 'api/client/metrics/feature-toggles';
|
||||
const URI = 'api/admin/metrics/feature-toggles';
|
||||
|
||||
function fetchFeatureMetrics () {
|
||||
return fetch(URI)
|
||||
return fetch(URI, { credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
||||
const seenURI = 'api/client/seen-apps';
|
||||
const seenURI = 'api/admin/metrics/seen-apps';
|
||||
|
||||
function fetchSeenApps () {
|
||||
return fetch(seenURI)
|
||||
return fetch(seenURI, { credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { throwIfNotSuccess } from './helper';
|
||||
|
||||
const URI = 'api/events';
|
||||
const URI = 'api/admin/events';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(URI)
|
||||
return fetch(URI, { credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
||||
function fetchHistoryForToggle (toggleName) {
|
||||
return fetch(`${URI}/${toggleName}`)
|
||||
return fetch(`${URI}/${toggleName}`, { credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { throwIfNotSuccess, headers } from './helper';
|
||||
|
||||
const URI = 'api/strategies';
|
||||
const URI = 'api/admin/strategies';
|
||||
|
||||
function fetchAll () {
|
||||
return fetch(URI)
|
||||
return fetch(URI, { credentials: 'include' })
|
||||
.then(throwIfNotSuccess)
|
||||
.then(response => response.json());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user