Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud AMBROSELLI committed May 7, 2024
1 parent 12557da commit cb78d5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/src/scripts/sync-goals.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { grabBadgeFromCatalog } = require("../utils/badges");
const { countMaxConsecutiveDays, getStarsCorrespondingToConsecutiveDays } = require("../utils/drinks");
const { checkCurrentWeekGoal } = require("../utils/goals");

async function syncBadges(fixGoals = false, debug = false) {
async function syncGoals(fixGoals = false, debug = false) {
const users = await prisma.user.findMany({
where: {
goal_isSetup: true,
Expand All @@ -20,7 +20,7 @@ async function syncBadges(fixGoals = false, debug = false) {
orderBy: { date: "desc" },
},
},
take: 100,
// take: 100,
// skip: 1100,
});
console.log("USERS", users.length);
Expand Down Expand Up @@ -241,4 +241,4 @@ async function syncBadges(fixGoals = false, debug = false) {
});
}

syncBadges(false, true);
syncGoals(false, false);

0 comments on commit cb78d5f

Please sign in to comment.