Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
dvj1988 committed Jan 29, 2025
1 parent 1cd7aa6 commit 812a10c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/client/cypress/support/Objects/FeatureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export const getConsolidatedDataApi = (
if (
res.statusCode === 200 ||
res.statusCode === 401 ||
res.statusCode === 500
res.statusCode === 500 ||
res.statusCode === 304
) {
const originalResponse = res?.body;
const updatedResponse = produce(originalResponse, (draft: any) => {
Expand Down Expand Up @@ -86,7 +87,7 @@ export const featureFlagInterceptForLicenseFlags = () => {

cy.intercept("GET", "/api/v1/consolidated-api/*?*", (req) => {
req.reply((res: any) => {
if (res.statusCode === 200) {
if (res.statusCode === 200 || res.statusCode === 304) {
const originalResponse = res?.body;
const updatedResponse = produce(originalResponse, (draft: any) => {
draft.data.featureFlags.data = {};
Expand Down
12 changes: 10 additions & 2 deletions app/client/src/api/services/ConsolidatedPageLoadApi/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@ export const getConsolidatedPageLoadDataView = async (
) => {
const viewUrl = ConsolidatedApiUtils.getViewUrl(params);

return api.get<InitConsolidatedApi>(viewUrl);
return api.get<InitConsolidatedApi>(viewUrl, {
headers: {
"x-initiated-from": "main-thread",
},
});
};

export const getConsolidatedPageLoadDataEdit = async (
params: ConsolidatedApiParams,
) => {
const editUrl = ConsolidatedApiUtils.getEditUrl(params);

return api.get<InitConsolidatedApi>(editUrl);
return api.get<InitConsolidatedApi>(editUrl, {
headers: {
"x-initiated-from": "main-thread",
},
});
};

0 comments on commit 812a10c

Please sign in to comment.