feat/df-1182: Save-and-exit when logged in - #1272
Open
jbarnsley10 wants to merge 5 commits into
Open
Conversation
|
alexluckett
reviewed
Sep 8, 2026
Comment on lines
+181
to
+184
| const saveAndExitBase = config.get('useSignInFeature') | ||
| ? 'save-and-exit-v2' | ||
| : 'save-and-exit' | ||
|
|
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Ticket DF-1182
Generates a save-and-exit-v2 message for
forms-submission-apito 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