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 {
238238 try {
239239 // Limit API to published sites for now until we have a patch for the issues with unpublished sites
240240 // 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+
242246 const response = await axios . get ( apiUrl , {
243247 headers : {
244248 Authorization : `Bearer ${ accessToken } ` ,
Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ export class OrgUtils {
160160 * @param connection the connection to the org
161161 */
162162 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+
163168 const dirname = path . dirname ( url . fileURLToPath ( import . meta. url ) ) ;
164169 const packageJsonFilePath = path . resolve ( dirname , '../../package.json' ) ;
165170
You can’t perform that action at this time.
0 commit comments