Skip to content

Commit

Permalink
adding new column for gpp version (issue#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisca Renata Wijaya authored and Francisca Renata Wijaya committed Jun 2, 2024
1 parent c9285e2 commit 13f83b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions gpc-analysis-extension/src/background/analysis/analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,6 @@ var analysisUserendSkeleton = () => {
OptanonConsent_after_gpc: null,
gpp_before_gpc: null,
gpp_after_gpc: null,
OneTrustWPCCPAGoogleOptOut_before_gpc: null,
OneTrustWPCCPAGoogleOptOut_after_gpc: null,
OTGPPConsent_before_gpc: null,
OTGPPConsent_after_gpc: null
};
};

Expand Down Expand Up @@ -624,7 +620,6 @@ function logData(domain, command, data) {
analysis_userend[domain]["gpp_after_gpc"] = data["gppString"];
}
}

storage.set(stores.analysis, analysis_userend[domain], domain);
}

Expand Down
5 changes: 5 additions & 0 deletions rest-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ async function rest(table) {
var OptanonConsent_after_gpc = req.body.OptanonConsent_after_gpc;
var gpp_before_gpc = req.body.gpp_before_gpc;
var gpp_after_gpc = req.body.gpp_after_gpc;
var gpp_version_before_gpc = req.body.gpp_version_before_gpc;
var gpp_version_after_gpc = req.body.gpp_version_after_gpc;

var urlClassification = req.body.urlClassification;
var OneTrustWPCCPAGoogleOptOut_before_gpc = req.body.OneTrustWPCCPAGoogleOptOut_before_gpc;
var OneTrustWPCCPAGoogleOptOut_after_gpc = req.body.OneTrustWPCCPAGoogleOptOut_after_gpc;
Expand All @@ -91,6 +94,8 @@ async function rest(table) {
OptanonConsent_after_gpc,
gpp_before_gpc,
gpp_after_gpc,
gpp_version_before_gpc,
gpp_version_after_gpc,
urlClassification,
OneTrustWPCCPAGoogleOptOut_before_gpc,
OneTrustWPCCPAGoogleOptOut_after_gpc,
Expand Down

2 comments on commit 13f83b1

@bryandelerson
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello!

I'm encountering a bug after this commit - the gpp_version_before_gpc/gpp_version_after_gpc values are passed in here (index.js:97-98), but they are not included in the SQL insert statement (index.js:83), nor are they showing up in the POST request from the extension. As a result, these values are getting written to the wrong columns.

These new columns are also not in the DB schema for the repo, so that might need to be updated as well.

@franciscawijaya
Copy link
Member

@franciscawijaya franciscawijaya commented on 13f83b1 Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bryandelerson thank you for the comment! Yes, this is not the most updated code. This commit was previously done as a point of reference to discuss with my lab mate. Nevertheless, I've now debugged the code and am currently in the middle of testing it! I will be making a commit and updated the SQL command shortly. Thank you :)

Please sign in to comment.