Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIP #6 impl #267

Merged
merged 9 commits into from
Apr 10, 2020
Merged

AIP #6 impl #267

merged 9 commits into from
Apr 10, 2020

Conversation

samparsky
Copy link
Contributor

Adds implementation of AIP#6 to validator

routes/schemas.js Outdated Show resolved Hide resolved
let aggr = { ...initialAggr }

const ev = { ...event, ...session } // add session details (i.e country, device type etc) to event
Copy link
Member

Choose a reason for hiding this comment

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

why don't you just pass the session to getPayout

Copy link
Member

Choose a reason for hiding this comment

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

please answer this @samparsky

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have changed it to pass session

services/sentry/lib/getPayout.js Outdated Show resolved Hide resolved
services/sentry/lib/getPayout.js Outdated Show resolved Hide resolved
Copy link
Member

@Ivshti Ivshti left a comment

Choose a reason for hiding this comment

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

there are very repetitive parts - please fix

@@ -114,12 +114,23 @@ module.exports = {
.keys()
.pattern(
/^(IMPRESSION|CLICK)$/,
Joi.object({ min: numericString.default('0'), max: numericString.default('0') })
Joi.object({ min: numericString.required(), max: numericString.required() })
Copy link
Member

Choose a reason for hiding this comment

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

why does this no longer have a default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This because if it has default '0', then the behavior becomes unreliable if an advertiser specifies one property and omits the next. e.g. specifies min omits max

let aggr = { ...initialAggr }

const ev = { ...event, ...session } // add session details (i.e country, device type etc) to event
Copy link
Member

Choose a reason for hiding this comment

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

please answer this @samparsky

services/sentry/lib/getPayout.js Outdated Show resolved Hide resolved
services/sentry/lib/getPayout.js Outdated Show resolved Hide resolved
services/sentry/lib/getPayout.js Outdated Show resolved Hide resolved
@Ivshti Ivshti merged commit 3039778 into AmbireTech:master Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants