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

store handlers for viewing, creating, and editing coupons #77

Closed
cdepillabout opened this issue Dec 17, 2016 · 2 comments · Fixed by #111
Closed

store handlers for viewing, creating, and editing coupons #77

cdepillabout opened this issue Dec 17, 2016 · 2 comments · Fixed by #111
Assignees

Comments

@cdepillabout
Copy link
Contributor

I'll do this.

@cdepillabout
Copy link
Contributor Author

cdepillabout commented Dec 26, 2016

This includes the following 6 handlers:

  • GET my store coupons
    - show list of all coupons
    - GET http://$domain/store/coupon
    - storeUser_store_coupon.pug
  • GET my store coupon detail
    - show individual coupon
    - GET http://$domain/store/coupon/${coupon_id}
    - storeUser_store_coupon_id.pug
    - Same as coupon detail page for end-user except that this page has some links for store user.
  • GET my coupon create page
    - page for creating a new coupon for a store
    - GET http://$domain/store/coupon/create
    - what is the pug file???
    * pug file for "GET my coupon create page" api #76
    * let's reuse the storeUser_store_coupon_id_edit.pug with making
    the word "編集" changeable by template variable. (I guess it's
    better to use English word such as "Edit"/"Create" for the
    variable.)
  • POST my new coupon
    - POST a new coupon
    - POST http://$domain/store/coupon
    - on error shows pug file from "GET my coupon create page" (storeUser_store_coupon_id_edit.pug)
    - redirects to "GET my store coupons" on success
  • GET my coupon edit page
    - edit an existing coupon
    - GET http://$domain/store/coupon/${coupon_id}/edit
    - storeUser_store_coupon_id_edit.pug
  • PUT Edit my coupon
    - edit an existing coupon
    - PUT http://$domain/store/coupon/${coupon_id}/edit
    - on error show the pug file for "GET my coupon edit page"
    - redirect to GET my store coupons on success

@cdepillabout
Copy link
Contributor Author

GET my coupon create page and POST my new coupon have been implemented in #82.

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 a pull request may close this issue.

1 participant