Skip to content

feat/df-1182: Save-and-exit when logged in - #1272

Open
jbarnsley10 wants to merge 5 commits into
mainfrom
feat/df-1182-save-and-exit
Open

feat/df-1182: Save-and-exit when logged in#1272
jbarnsley10 wants to merge 5 commits into
mainfrom
feat/df-1182-save-and-exit

Conversation

@jbarnsley10

@jbarnsley10 jbarnsley10 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Ticket DF-1182

Generates a save-and-exit-v2 message for forms-submission-api to pick up.
This mechanism needs to operate independently of 'save-and-exit' V1 (legacy) so the two can operate together.

Requires a model bump from DEFRA/forms-designer#1562

@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

Comment thread src/server/index.ts
Comment on lines +181 to +184
const saveAndExitBase = config.get('useSignInFeature')
? 'save-and-exit-v2'
: 'save-and-exit'

@alexluckett alexluckett Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a fan of publicly exposing v1/v2 concepts. Curious users will experiment by dropping off -v2 and might end up breaking things. Better to not give them the control.

A single route with a conditional handler is a nicer way in this case:

handler(request, h) {
   if(config.get('useSignInFeature')) {
       handleAuthenticatedSaveAndExit(request, h)
   } else {
       handleMemorableWordSaveAndExit(request, h)
   }
}

etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants