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

feat(cms): Add Product API to CMS #159

Merged
merged 2 commits into from
Sep 8, 2024
Merged

feat(cms): Add Product API to CMS #159

merged 2 commits into from
Sep 8, 2024

Conversation

mrzzy
Copy link
Contributor

@mrzzy mrzzy commented Jun 2, 2024

Motivation

See card

Contents

⚠️ Needs #158

Implements Product API in CMS with the following product schema:

  • Some schema deviations from the original Product schema in package/types/lib/merch.ts due to Payload limitations.
{
  "id": "665c24f355ede133318452da",
  "name": "Product",
  "colors": [
    "black",
    "blue"
  ],
  "sizes": [
    "s",
    "xl"
  ],
  "images": [
    {
      "url": "https://github.com/ntuscse/website/pull/158",
      "id": "665c24c7a1786092419c4a90"
    },
    {
      "url": "https://github.com/ntuscse/website/pull/158",
      "id": "665c24cda1786092419c4a91"
    }
  ],
  "price": 0.2,
  "category": "hat",
  "size_chart": "https://github.com/ntuscse/website/pull/158",
  "stock": [
    {
      "color": "white",
      "quantity": 5,
      "id": "665c24e1a1786092419c4a92"
    }
  ],
  "createdAt": "2024-06-02T07:53:23.679Z",
  "updatedAt": "2024-06-02T07:53:23.679Z"
}

Demo: Download & import Postman API collection

@mrzzy mrzzy added the enhancement New feature or request label Jun 2, 2024
@mrzzy mrzzy requested a review from Iyzyman June 2, 2024 08:18
@mrzzy mrzzy self-assigned this Jun 2, 2024
Copy link

vercel bot commented Jun 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
website-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 8, 2024 0:41am

Iyzyman
Iyzyman previously approved these changes Jun 4, 2024
Copy link
Member

@chanbakjsd chanbakjsd left a comment

Choose a reason for hiding this comment

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

We might want to consider how the business team/users will be using this website in our schemas. LGTM otherwise!

apps/cms/src/collections/Products.ts Outdated Show resolved Hide resolved
Iyzyman
Iyzyman previously approved these changes Sep 7, 2024
Copy link
Contributor

@Iyzyman Iyzyman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link

github-actions bot commented Sep 8, 2024

Deployment preview link: https://website-9c4p89ww0-cse-it.vercel.app

@mrzzy mrzzy enabled auto-merge (squash) September 8, 2024 01:39
Copy link
Contributor

@jack-thant jack-thant left a comment

Choose a reason for hiding this comment

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

LGTM🚀

@mrzzy mrzzy merged commit 7a961fa into main Sep 8, 2024
6 checks passed
@mrzzy mrzzy deleted the feat/product-api branch September 26, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants