Skip to content

Commit 814920b

Browse files
committed
feat: apis changes in admin-ui #649
1 parent fd0f671 commit 814920b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

admin-ui/app/redux/api/axios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import axios from "axios"
22

3-
export const baseUrl = process.env.API_BASE_URL || "http://localhost:8080"
3+
export const baseUrl = process.env.CONFIG_API_BASE_URL || "http://localhost:8080"
44
export default axios.create({
55
baseURL: baseUrl,
66
timeout: 30000

admin-ui/app/redux/api/backend-api.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useSelector } from 'react-redux'
77
export const fetchServerConfiguration = async (token) => {
88
const headers = { Authorization: `Bearer ${token}` }
99
return axios
10-
.get('/oauth2/config', { headers })
10+
.get('/app/admin-ui/oauth2/config', { headers })
1111
.then((response) => response.data)
1212
.catch((error) => {
1313
console.error(
@@ -32,7 +32,7 @@ export const getUserIpAndLocation = async () => {
3232
// Retrieve user information
3333
export const fetchUserInformation = async (code) => {
3434
return axios
35-
.post('/oauth2/user-info', {
35+
.post('/app/admin-ui/oauth2/user-info', {
3636
code: code,
3737
})
3838
.then((response) => response.data)
@@ -48,7 +48,7 @@ export const fetchUserInformation = async (code) => {
4848
// post user action
4949
export const postUserAction = async (userAction) => {
5050
return axios
51-
.post('/logging/audit', {
51+
.post('/admin-ui/logging/audit', {
5252
headers: {
5353
'Content-Type': 'application/json',
5454
},
@@ -63,7 +63,7 @@ export const postUserAction = async (userAction) => {
6363
// Get API Access Token
6464
export const fetchApiAccessToken = async (jwt) => {
6565
return axios
66-
.get('/oauth2/api-protection-token', { params: { ujwt: jwt } })
66+
.get('/app/admin-ui/oauth2/api-protection-token', { params: { ujwt: jwt } })
6767
.then((response) => response.data)
6868
.catch((error) => {
6969
console.error(
@@ -76,7 +76,7 @@ export const fetchApiAccessToken = async (jwt) => {
7676

7777
export const fetchApiTokenWithDefaultScopes = async () => {
7878
return axios
79-
.get('/oauth2/api-protection-token')
79+
.get('/app/admin-ui/oauth2/api-protection-token')
8080
.then((response) => response.data)
8181
.catch((error) => {
8282
console.error(

admin-ui/app/redux/api/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import axios from "axios"
22

3-
export const baseUrl = process.env.API_BASE_URL || "http://localhost:8080"
3+
export const baseUrl = process.env.CONFIG_API_BASE_URL || "http://localhost:8080"
44
export default axios.create({
55
baseURL: baseUrl,
66
timeout: 30000

0 commit comments

Comments
 (0)