Skip to content

Commit

Permalink
Merge pull request #186 from DANS-KNAW/development
Browse files Browse the repository at this point in the history
moved repo advisor uri to env
  • Loading branch information
ddzyne authored Aug 15, 2024
2 parents 91b838c + 4086899 commit 390378c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions apps/4tu/.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ VITE_OIDC_AUTHORITY = ''
VITE_OIDC_CLIENT_ID = ''
VITE_OIDC_SCOPE = 'openid profile'

## Advisor config
VITE_ADVISOR_URI = ''

## API keys
VITE_GEONAMES_API_KEY = ''

Expand Down
3 changes: 3 additions & 0 deletions apps/digitaltwins/.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ VITE_TARGET_1_REPO = ''
VITE_TARGET_1_KEY_URL = ''
VITE_TARGET_1_KEY_CHECK_URL = ''

## Mapper config
VITE_MAPPER_URI = ''

## OIDC config
VITE_OIDC_AUTHORITY = ''
VITE_OIDC_CLIENT_ID = ''
Expand Down
4 changes: 2 additions & 2 deletions packages/repo-advisor/src/features/RepoAdvisor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const RepoAdvisor = ({setRepoConfig, page, depositLocation}: {

return (
<Container>
<Grid container>
<Grid xs={12} mt={4}>
<Grid container display="flex" justifyContent="center">
<Grid xs={12} md={10} lg={8} mt={4}>
<Paper sx={{p: 4}}>
<Stepper
activeStep={activeStep}
Expand Down
4 changes: 1 addition & 3 deletions packages/repo-advisor/src/features/repoAdvisorApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ import type { RepoResponse } from "../types";
export const repoAdvisorApi = createApi({
reducerPath: "repoAdvisorApi",
baseQuery: fetchBaseQuery({
baseUrl: `https://repository-assistant.labs.dansdemo.nl`,
baseUrl: import.meta.env.VITE_ADVISOR_URI,
}),
endpoints: (build) => ({
fetchData: build.query({
query: ({ ror, narcis, depositType, fileType }) => {
const user = getUser();
// format headers
const headers = {
"Content-Type": "application/json",
Authorization: `Bearer ${user?.access_token}`,
// Authorization: "Bearer @km1-10122004-lamA!M@rdh1yy@h@51nnur1@hK",
};

return ({
Expand Down
2 changes: 1 addition & 1 deletion packages/repo-advisor/src/languages/locales/en/steps.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"repoAdvisorDescription": "Fill out the form below to get recommendations on where to submit your data.",
"defineDataset": "Define your data set",
"recommendations": "Get recommendations",
"buttonBack": "Back a step",
"buttonBack": "Previous step",
"buttonNext": "Next step",
"buttonLast": "Go to deposit",
"isLoading": "Loading",
Expand Down
2 changes: 1 addition & 1 deletion packages/repo-advisor/src/languages/locales/nl/steps.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"repoAdvisorDescription": "Fill out the form below to get recommendations on where to submit your data.",
"defineDataset": "Define your data set",
"recommendations": "Get recommendations",
"buttonBack": "Back a step",
"buttonBack": "Previous step",
"buttonNext": "Next step",
"buttonLast": "Go to deposit",
"isLoading": "Loading",
Expand Down

0 comments on commit 390378c

Please sign in to comment.