Skip to content

Commit

Permalink
app micro-opti
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamoziit committed Nov 27, 2024
1 parent db748cc commit 5e2e22b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions backend/controllers/payment.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export const paymentHandler = async (req, res) => {
export const confirmMembership = async (req, res) => {
try {
const { order_id, session_id, user_id } = req.body;
console.log({ order_id, session_id, user_id });


const product = clubs.find(club => club.id === order_id);
const session = await stripe.checkout.sessions.retrieve(session_id, {
expand: ['payment_intent.payment_method']
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/hooks/useSignup.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const useSignup = () => {
export default useSignup;


function handleInputErrors({ name, email, password, mobileNo }) {
if (!name || !email || !password || !mobileNo) {
function handleInputErrors({ name, email, password, mobileNo, role }) {
if (!name || !email || !password || !mobileNo || !role) {
toast.error("Please fill all the fields");
return false;
}
Expand Down

0 comments on commit 5e2e22b

Please sign in to comment.