Skip to content

Commit

Permalink
data validation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Winston-Hsiao committed Nov 12, 2024
1 parent 62c87a4 commit a301466
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

</div>

# K-Scale Store
# K-Scale

This is the codebase for our website.

Expand Down
4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@
</script>


<title>K-Scale Store</title>
<title>K-Scale</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="src/index.tsx"></script>
</body>

</html>
</html>
8 changes: 7 additions & 1 deletion frontend/src/components/pages/CreateSell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,16 @@ const CreateSell = () => {
"inventory_quantity",
data.inventory_quantity?.toString() || "",
);

// Convert preorder_release_date to a timestamp
const preorderReleaseDate = data.preorder_release_date
? new Date(data.preorder_release_date).getTime() / 1000
: null;
formData.append(
"preorder_release_date",
data.preorder_release_date?.toString() || "",
preorderReleaseDate ? preorderReleaseDate.toString() : "",
);

formData.append("is_reservation", data.is_reservation?.toString() || "");
formData.append(
"reservation_deposit_amount",
Expand Down

0 comments on commit a301466

Please sign in to comment.