File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ module.exports = router => {
1010
1111 } )
1212
13+ router . get ( '/sign-in-as-single-org-user' , ( req , res ) => {
14+
15+ // Set organisation and user Id
16+ req . session . data . currentOrganisationId = req . session . data . organisations [ 1 ] . id
17+ req . session . data . currentUserId = "12345" ;
18+
19+ res . redirect ( '/home' )
20+ } )
21+
1322 router . post ( '/select-organisation' , ( req , res ) => {
1423 const organisationId = req . session . data . organisationId
1524
@@ -21,7 +30,7 @@ module.exports = router => {
2130 delete req . session . data . organisationId
2231 req . session . data . multiOrganisation = "no"
2332
24- res . redirect ( '/find-a-patient ' )
33+ res . redirect ( '/home ' )
2534 } else {
2635
2736 const error = {
@@ -41,7 +50,7 @@ module.exports = router => {
4150 router . get ( '/sign-out' , ( req , res ) => {
4251 req . session . data . currentUserId = null
4352
44- res . redirect ( '/home ' )
53+ res . redirect ( '/signed-out ' )
4554 } )
4655
4756}
Original file line number Diff line number Diff line change 3333
3434 < h2 > Main interface</ h2 >
3535
36- < p > < a href ="/home " > Homepage </ a > </ p >
37- < p > < a href ="/home ?multiOrganisation=yes "> Homepage - sign in as a user belonging to 2 organisations</ a > </ p >
36+ < p > < a href ="/signed-out " > Signed out page </ a > </ p >
37+ < p > < a href ="/signed-out ?multiOrganisation=yes "> Signed out page - sign in as a user belonging to 2 organisations</ a > </ p >
3838
3939 < ul >
4040 < li > < a href ="/vaccines "> Vaccines</ a > </ li >
Original file line number Diff line number Diff line change 2323 {{ button({
2424 classes: "app-button--okta nhsuk-u-margin-top-5",
2525 text: "Sign in",
26- href: ("/select-organisation" if data.multiOrganisation == "yes" else "/find-a-patient ")
26+ href: ("/select-organisation" if data.multiOrganisation == "yes" else "/sign-in-as-single-org-user ")
2727 }) }}
2828
2929 </ div > </ form > </ div > < div class ="siw-main-footer "> < div class ="auth-footer "> </ div > </ div > </ div > </ div > </ div > </ main > </ div >
File renamed without changes.
You can’t perform that action at this time.
0 commit comments