File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,11 @@ export class ExperienceSite {
238
238
try {
239
239
// Limit API to published sites for now until we have a patch for the issues with unpublished sites
240
240
// TODO switch api back to preview mode after issues are addressed
241
- const apiUrl = `${ instanceUrl } /services/data/v63.0/sites/${ siteIdMinus3 } /preview?published` ;
241
+ let apiUrl = `${ instanceUrl } /services/data/v63.0/sites/${ siteIdMinus3 } /preview?published` ;
242
+ if ( process . env . SITE_API_MODE === 'preview' ) {
243
+ apiUrl = `${ instanceUrl } /services/data/v63.0/sites/${ siteIdMinus3 } /preview` ;
244
+ }
245
+
242
246
const response = await axios . get ( apiUrl , {
243
247
headers : {
244
248
Authorization : `Bearer ${ accessToken } ` ,
Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ export class OrgUtils {
160
160
* @param connection the connection to the org
161
161
*/
162
162
public static ensureMatchingAPIVersion ( connection : Connection ) : void {
163
+ // Testing purposes only - using this flag may cause local development to not function correctly
164
+ if ( process . env . SKIP_API_VERSION_CHECK === 'true' ) {
165
+ return ;
166
+ }
167
+
163
168
const dirname = path . dirname ( url . fileURLToPath ( import . meta. url ) ) ;
164
169
const packageJsonFilePath = path . resolve ( dirname , '../../package.json' ) ;
165
170
You can’t perform that action at this time.
0 commit comments