Skip to content

Commit

Permalink
chore: Fix hardcoded urls
Browse files Browse the repository at this point in the history
  • Loading branch information
das-Abroxas committed Apr 15, 2024
1 parent 30e699a commit 5790bf1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default defineNuxtConfig({
clientId: "test",
clientSecret: "QgBl9I2CD3eVhL7LFvkHrYUK7oKL3LE2",
serverUrl: "http://localhost:1998",
redirectUrl: "http://localhost:3000/auth/callback",
redirectUrl: "http://localhost:3000/callback",
realm: "test",
scope: ["openid"],
}
Expand Down
2 changes: 1 addition & 1 deletion server/api/user.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { v2GetUserResponse } from '~/composables/aruna_api_json'
export default defineEventHandler(async event => {
const userId = getQuery(event)['userId']
const baseUrl = useRuntimeConfig().serverHostUrl
const fetchUrl = userId ? `http://localhost:8080/v2/user?userId=${userId}` : `${baseUrl}/v2/user`
const fetchUrl = userId ? `${baseUrl}/v2/user?userId=${userId}` : `${baseUrl}/v2/user`
const response = await $fetch<v2GetUserResponse>(fetchUrl, {
headers: {
'Authorization': `Bearer ${event.context.access_token}`
Expand Down
2 changes: 1 addition & 1 deletion server/routes/auth/login.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineEventHandler(async event => {
event,
withQuery(authorizationURL, {
client_id: config.clientId,
redirect_uri: "http://localhost:3000/auth/callback",
redirect_uri: config.redirectUrl,
scope: config.scope.join(' '),
response_type: 'code',
})
Expand Down

0 comments on commit 5790bf1

Please sign in to comment.