Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyrlex committed Oct 9, 2023
1 parent 7b54f56 commit 0805d51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pages/admin/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Index: NextPage = () => {
</div>
</form>
)}
{isAllowed && (
{/* {isAllowed && (
<div>
<label className='font-bold text-2xl'>
Please fill-in your 2FA Code
Expand All @@ -169,7 +169,7 @@ const Index: NextPage = () => {
Submit
</button>
</div>
)}
)} */}
</div>
{message.text !== '' && (
<Toast
Expand Down
10 changes: 0 additions & 10 deletions pages/api/products/[product_id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ export default withIronSessionApiRoute(async function productId(
} break;

case 'GET': {
if (!isValidObjectId(req.query.product_id)) {
res.status(StatusCodes.BAD_REQUEST).json({
error: true,
message: getReasonPhrase(StatusCodes.BAD_REQUEST),
data: null,
});

return;
}

const product = await Product.findById(req.query.product_id);

if (!product) {
Expand Down

0 comments on commit 0805d51

Please sign in to comment.