File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
python/image-content-search/src/landingPage Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 1414 var idToken = authData . split ( '&' ) . find ( ( rec ) => rec . split ( '=' ) [ 0 ] == 'id_token' ) . split ( '=' ) [ 1 ]
1515 var getSignedUrlEndpoint = window . location . href . split ( '#' ) [ 0 ] . replace ( 'web' , 'signedUrl' )
1616 var searchImageEndpoint = window . location . href . split ( '#' ) [ 0 ] . replace ( 'web' , 'search' )
17- var loginPage = '### loginPage### ' ;
17+ var loginPage = '{ loginPage} ' ;
1818 var logoutPage = loginPage . replace ( 'login' , 'logout' ) ;
1919
2020 function logout ( ) {
Original file line number Diff line number Diff line change @@ -11,9 +11,7 @@ def handler(event, context):
1111 'headers' : {
1212 'Content-Type' : 'text/html'
1313 },
14- 'body' : file_get_contents ("index.html" ).replace ('###loginPage###' , login_page )
15- }
16-
14+ 'body' : file_get_contents ("index.html" ).format (loginPage = login_page )
1715def file_get_contents (filename ):
1816 with open (filename ) as f :
1917 return f .read ()
You can’t perform that action at this time.
0 commit comments