Skip to content

Commit

Permalink
Merge pull request #1213 from navikt/fix/copy-skjemadelingslenke-url
Browse files Browse the repository at this point in the history
Always use skjemadelingslenke url when copy url in settings
  • Loading branch information
magnurh-cx authored Jun 13, 2024
2 parents d43c82d + 27e755a commit fd495a4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/bygger-backend/src/config/development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const prodFormio: Pick<FormioConfig, 'apiService' | 'projectName'> = {
projectName: 'jvcemxwcpghcqjn',
};

export const devFyllut: FyllutConfig = {
export const devFyllut: Partial<FyllutConfig> = {
baseUrl: 'https://skjemadelingslenke.ekstern.dev.nav.no/fyllut',
};

Expand Down
1 change: 1 addition & 0 deletions packages/bygger-backend/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const config: ConfigType = {
: undefined,
fyllut: {
baseUrl: env('FYLLUT_BASE_URL', devFyllut.baseUrl),
skjemadelingslenkeUrl: 'https://skjemadelingslenke.ekstern.dev.nav.no/fyllut',
},
pusher: {
cluster: env('PUSHER_CLUSTER', devPusher.cluster),
Expand Down
1 change: 1 addition & 0 deletions packages/bygger-backend/src/config/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export type FormioConfig = {

export type FyllutConfig = {
baseUrl: string;
skjemadelingslenkeUrl: string;
};

export type PusherConfig = {
Expand Down
1 change: 1 addition & 0 deletions packages/bygger-backend/src/routers/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const config = (req: ByggerRequest, res: Response) => {
res.json({
formioProjectUrl: `${getByggerUrl(req)}/${appConfig.formio.projectName}`,
fyllutBaseUrl: `${getByggerUrl(req)}/fyllut`,
skjemadelingslenkeUrl: appConfig.fyllut.skjemadelingslenkeUrl,
pusherCluster: appConfig.pusher.cluster,
pusherKey: appConfig.pusher.key,
isDevelopment: appConfig.isDevelopment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const TestSkjemaFields = ({ onChange, form }: TestSkjemaFieldsProps) => {
<span className={styles.copyLink}>
Skjemadelingslenke
<Button
onClick={() => copy(`${config!.fyllutBaseUrl}/test/login?formPath=${path}`)}
onClick={() => copy(`${config!.skjemadelingslenkeUrl}/test/login?formPath=${path}`)}
icon={<Copy />}
title="Kopier skjemadelingslenke"
variant="tertiary"
Expand Down

0 comments on commit fd495a4

Please sign in to comment.