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

Bongocat counter is hardcoded #5

Open
Nexuist opened this issue Oct 8, 2018 · 0 comments
Open

Bongocat counter is hardcoded #5

Nexuist opened this issue Oct 8, 2018 · 0 comments

Comments

@Nexuist
Copy link
Owner

Nexuist commented Oct 8, 2018

Right now in backend/handler.js, bongocats is determined like so:

const bongocats = 90;

This variable is used to hold the total amount of videos currently in the bongocats database. This means that whenever a new entry is added to the database this constant needs to be changed and the whole backend must be redeployed. That’s obviously not ideal.

A better way to do this would be to calculate bongocats on the fly within the bongo function, using the DescribeTable API call offered by DynamoDB to get the total amount of items in the table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant