-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add the POST /store/coupon and GET /store/coupon/create handlers. #82
Conversation
Also add some From/ToHttpApiData instances. Make some formatting changes.
There was a problem hiding this 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}' |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
This has been fixed in commit ced7968.
This has been fixed in commit 87b579c. |
I'll go ahead and merge this in. |
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.