File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
samples/musicfestival-frontend-react/src Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import { BlockPage } from './pages/BlockPage';
1616
1717let previousSavedMessage : any = null ;
1818const singleKeyUrl = process . env . REACT_APP_CONTENT_GRAPH_GATEWAY_URL as string
19- const hmacKeyUrl = process . env . REACT_APP_CG_PREVIEW_URL as string
19+ const previewUrl = process . env . REACT_APP_CG_PREVIEW_URL as string
2020
2121const App = ( ) => {
2222 const queryClient = useQueryClient ( ) ;
@@ -43,7 +43,7 @@ const App = () => {
4343 if ( previewToken ) {
4444 headers = { 'Authorization' : 'Bearer ' + previewToken } ;
4545 }
46- url = hmacKeyUrl
46+ url = previewUrl
4747 subcribeContentSavedEvent ( ( message : any ) => mutate ( message ) )
4848 }
4949
Original file line number Diff line number Diff line change @@ -18,13 +18,10 @@ const getImageUrl = (path = "") => {
1818}
1919
2020const extractParams = ( token : string , urlPath : string ) => {
21- var payload : Payload = {
22- c_id : undefined ,
23- c_ver : undefined
24- } ;
21+ var payload : Payload = { } ;
2522
2623 if ( token ) {
27- const base64String = token . substring ( token . indexOf ( '.' ) + 1 , token . lastIndexOf ( '.' ) ) ;
24+ const base64String = token . split ( '.' ) [ 1 ]
2825 payload = JSON . parse ( Buffer . from ( base64String , 'base64' ) . toString ( ) ) ;
2926 }
3027
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import { subcribeContentSavedEvent } from "../helpers/contentSavedEvent";
2121
2222let previousSavedMessage : any = null ;
2323const singleKeyUrl = process . env . REACT_APP_CONTENT_GRAPH_GATEWAY_URL as string
24- const hmacKeyUrl = process . env . REACT_APP_CG_PREVIEW_URL as string
24+ const previewUrl = process . env . REACT_APP_CG_PREVIEW_URL as string
2525
2626function SearchPage ( ) {
2727 console . log ( "Start" )
@@ -80,7 +80,7 @@ function SearchPage() {
8080 if ( token ) {
8181 headers = { 'Authorization' : 'Bearer ' + token }
8282 }
83- url = hmacKeyUrl
83+ url = previewUrl
8484 subcribeContentSavedEvent ( ( message : any ) => mutate ( message ) )
8585 }
8686
You can’t perform that action at this time.
0 commit comments