Skip to content

Commit

Permalink
Merge pull request #658 from GluuFederation/admin-ui-issue-649
Browse files Browse the repository at this point in the history
feat: apis changes in admin-ui #649
  • Loading branch information
mjatin-dev authored Dec 13, 2022
2 parents b00db52 + 814920b commit 85db7a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion admin-ui/app/redux/api/axios.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios"

export const baseUrl = process.env.API_BASE_URL || "http://localhost:8080"
export const baseUrl = process.env.CONFIG_API_BASE_URL || "http://localhost:8080"
export default axios.create({
baseURL: baseUrl,
timeout: 30000
Expand Down
10 changes: 5 additions & 5 deletions admin-ui/app/redux/api/backend-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useSelector } from 'react-redux'
export const fetchServerConfiguration = async (token) => {
const headers = { Authorization: `Bearer ${token}` }
return axios
.get('/oauth2/config', { headers })
.get('/app/admin-ui/oauth2/config', { headers })
.then((response) => response.data)
.catch((error) => {
console.error(
Expand All @@ -32,7 +32,7 @@ export const getUserIpAndLocation = async () => {
// Retrieve user information
export const fetchUserInformation = async (code) => {
return axios
.post('/oauth2/user-info', {
.post('/app/admin-ui/oauth2/user-info', {
code: code,
})
.then((response) => response.data)
Expand All @@ -48,7 +48,7 @@ export const fetchUserInformation = async (code) => {
// post user action
export const postUserAction = async (userAction) => {
return axios
.post('/logging/audit', {
.post('/admin-ui/logging/audit', {
headers: {
'Content-Type': 'application/json',
},
Expand All @@ -63,7 +63,7 @@ export const postUserAction = async (userAction) => {
// Get API Access Token
export const fetchApiAccessToken = async (jwt) => {
return axios
.get('/oauth2/api-protection-token', { params: { ujwt: jwt } })
.get('/app/admin-ui/oauth2/api-protection-token', { params: { ujwt: jwt } })
.then((response) => response.data)
.catch((error) => {
console.error(
Expand All @@ -76,7 +76,7 @@ export const fetchApiAccessToken = async (jwt) => {

export const fetchApiTokenWithDefaultScopes = async () => {
return axios
.get('/oauth2/api-protection-token')
.get('/app/admin-ui/oauth2/api-protection-token')
.then((response) => response.data)
.catch((error) => {
console.error(
Expand Down
2 changes: 1 addition & 1 deletion admin-ui/app/redux/api/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios"

export const baseUrl = process.env.API_BASE_URL || "http://localhost:8080"
export const baseUrl = process.env.CONFIG_API_BASE_URL || "http://localhost:8080"
export default axios.create({
baseURL: baseUrl,
timeout: 30000
Expand Down

0 comments on commit 85db7a8

Please sign in to comment.