File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
pages/receipts/transactions/[id] Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,13 @@ export const getAuthorizationHeadersFromReq = (req) => {
1919 }
2020
2121 result [ 'Authorization' ] = authorization ;
22- } else if ( apiKey ) {
22+ }
23+
24+ if ( apiKey ) {
2325 result [ 'Api-Key' ] = apiKey ;
24- } else if ( personalToken ) {
26+ }
27+
28+ if ( personalToken ) {
2529 result [ 'Personal-Token' ] = personalToken ;
2630 }
2731
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import Receipt from '../../../../components/Receipt';
88
99class TransactionReceipt extends React . Component {
1010 static async getInitialProps ( ctx ) {
11- const isServer = Boolean ( ctx ) ;
11+ const isServer = Boolean ( ctx . req ) ;
1212 if ( isServer ) {
1313 const { id, pageFormat } = ctx . query ;
1414 const authorizationHeaders = authenticateRequest ( ctx . req ) ;
@@ -19,7 +19,7 @@ class TransactionReceipt extends React.Component {
1919 } ;
2020 }
2121
22- return { pageFormat : ctx ? .query ?. pageFormat } ;
22+ return { pageFormat : ctx . query ?. pageFormat } ;
2323 }
2424
2525 static getReceiptFromData ( transaction ) {
You can’t perform that action at this time.
0 commit comments