Skip to content

Commit

Permalink
fix: number limit of activity report
Browse files Browse the repository at this point in the history
  • Loading branch information
pbc1017 committed Jun 20, 2024
1 parent dcc9b8f commit e9eec99
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions back/routes/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@ router.post("/addActivity", async (req, res) => {
}

try {
const existingActivitiesCount = await Activity.count({
where: { club_id: clubId },
});

// If there are already 20 or more activities, do not proceed
if (existingActivitiesCount >= 20) {
return res
.status(400)
.send({ message: "Cannot add more than 20 activities." });
}
// const existingActivitiesCount = await Activity.count({
// where: { club_id: clubId },
// });

// // If there are already 20 or more activities, do not proceed
// if (existingActivitiesCount >= 20) {
// return res
// .status(400)
// .send({ message: "Cannot add more than 20 activities." });
// }

// Calculate the current date/time in KST (Korean Standard Time)
const currentDateTimeUTC = new Date();
Expand Down

0 comments on commit e9eec99

Please sign in to comment.