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

1. ORDERS(BACKEND): Work on "orderModel.js", "orderRoutes.js" , "server.js" and "orderController.js" #77

Open
trimakichan opened this issue May 16, 2023 · 0 comments
Assignees

Comments

@trimakichan
Copy link
Collaborator

trimakichan commented May 16, 2023

OrderModel.js

  • Create an "orderModel.js" file in the "models" folder.
  • Write the "orderSchema".
  • For the "orderItems" array in the "orderSchema", add the following:
    - name
    - qty
    - image
    - fee
    - event

orderRoutes.js

  • Create an "orderRoutes.js" file in the "routes" folder.
  • Import the necessary files or libraries and write routes for '/', '/id', and '/:id/pay'.

server.js

  • Add a route to '/api/orders'
  • Note: don't forget to import the "orderRoutes"

orderController.js

  • Create an "orderController.js" in the "controllers" folder.
  • Write "addOrderItems", "getOrderById" and "updateOrderToPaid" functions.

Note: Don't forget to import the functions into the orderRoutes.js later.

@trimakichan trimakichan converted this from a draft issue May 16, 2023
@AmandaRazmus AmandaRazmus moved this from Todo to In Progress in Kal - Event Page May 18, 2023
@AmandaRazmus AmandaRazmus moved this from In Progress to Back-End Done -SM: Makiko in Kal - Event Page May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Back-End Done -SM: Makiko
Development

No branches or pull requests

2 participants