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

Add the POST /store/coupon and GET /store/coupon/create handlers. #82

Merged
merged 11 commits into from
Jan 2, 2017

Conversation

cdepillabout
Copy link
Contributor

@cdepillabout cdepillabout commented Dec 26, 2016

If you run the api, and then access http://localhost/store/coupon/create you will be able to create a new coupon.

This implements two of the handlers from #77.

@arowM Please review.

Copy link
Contributor

@arowM arowM left a comment

Choose a reason for hiding this comment

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

@cdepillabout
Thanks for renaming to readable variable name and fixing specification documents.

When I tried to create a coupon with validFrom on Chrome, the page show me an error bellow.

could not parse: `2016-12-14'

Even if I do not specify validFrom and validUntil, the page show me an error bellow.

could not parse: `'

Also, I've created extra issue related to this PR on #83 and #85.

@@ -105,16 +107,16 @@ include _layout
input#giftReferencePrice(
name="giftReferencePrice" type="number"
min="0"
value="30"
value!='\#{fromMaybe "30" giftReferencePrice}'
Copy link
Contributor

Choose a reason for hiding this comment

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

The "30" I injected is just a sample.
If you do not have explicit reason to use "30" as a default value, please use mempty as default.
(Please fix line 117, 144, 153 as well as this line)

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 is fixed in commit d289dfb.

@cdepillabout
Copy link
Contributor Author

@arowM

When I tried to create a coupon with validFrom on Chrome, the page show me an error bellow.

could not parse: `2016-12-14'

This has been fixed in commit ced7968.

Even if I do not specify validFrom and validUntil, the page show me an error bellow.

could not parse: `'

This has been fixed in commit 87b579c.

@cdepillabout cdepillabout merged commit ffa6537 into blueimpact:master Jan 2, 2017
@cdepillabout cdepillabout deleted the store-coupon-handlers branch January 2, 2017 17:32
@cdepillabout
Copy link
Contributor Author

I'll go ahead and merge this in.

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