Skip to content

ACDEV-4956: refactoring, adding dailyBonus, availability - #3

Open
woolfi182 wants to merge 14 commits into
developfrom
feature/ACDEV-4956
Open

ACDEV-4956: refactoring, adding dailyBonus, availability#3
woolfi182 wants to merge 14 commits into
developfrom
feature/ACDEV-4956

Conversation

@woolfi182

Copy link
Copy Markdown

No description provided.

@talkot1 talkot1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@woolfi182 hey, there are 62 files changes in this PR. i have no idea how to review it like this or how to run sanity on that amount of changes.
can you please open new PRs with smaller amount of changes?
and please add unit tests if needed, like this example : https://github.com/Appcharge/common/commit/b1b0d2d4df7b8d54e178301c6ed93397b1c99fdc

Comment thread src/player/player.service.js
Comment thread src/order/router.js Outdated
Comment thread src/order/router.js Outdated
Comment thread src/offer/service.js Outdated
]);
const response = await axios.put(
this.offerUrl + offerId,
modifiedOfferDataset,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks complicated to understand what the object should look like, maybe we should put plain objects instead

Comment thread src/offer/service.js Outdated
Comment thread src/offer/schemas.js

const Position = ["right", "left", "center"];

const CreateOfferSchema = Joi.object({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what CreateOfferSchema is used for?

Comment thread src/order/router.js Outdated
};

router.post("/", async (req, res) => {
const { error } = GetOrdersRequestSchema.validate(req.body);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why are we making it that complicated?
if we want to show examples of how to use orders API / assets upload, wouldn't it make more sense to put examples with plain objects instead of doing double validations on the input and letting them figure out the request body from the Joi validation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

it was written by @shaiboujuappcharge a long time ago, I didn't touch this. I can remove this to make it easier to understand

Comment thread src/order/service.js Outdated
requestBody,
{
headers: {
signature: signature,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove all signatures from requests to the gateways, publisher token should be enough

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm not sure we removed it from all our packages. I'll discuss it with @talkot1

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.

3 participants