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

CoursePrice.price should be a decimal value #2523

Closed
singingwolfboy opened this issue Feb 8, 2017 · 0 comments
Closed

CoursePrice.price should be a decimal value #2523

singingwolfboy opened this issue Feb 8, 2017 · 0 comments

Comments

@singingwolfboy
Copy link
Contributor

Currently, the course price API serializes the price decimal field as a floating-point number, potentially losing precision. As a result, the CoursePrice flow type defines the price field to be a floating point number, rather than a decimal.

In order to maintain precision, the course price API should serialize the price field as a string, and the front-end should parse it into a decimal.js-light instance. This is the same technique we use for the amount field in the the coupon API.

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

No branches or pull requests

1 participant