diff --git a/app/routes/me.tsx b/app/routes/me.tsx index 3bd6302..b67b18e 100644 --- a/app/routes/me.tsx +++ b/app/routes/me.tsx @@ -56,27 +56,6 @@ export async function loader({ context }: { context: RequestContext }) { ) .bind(currentUser.id) .first(); - - if (etData) { - const now = new Date(); - const pointsData = await context.env.D1.prepare( - "SELECT answered_at, approved, day, month, performed_at, reached_minimum_player_count, type, year FROM events WHERE created_by = ? AND month = ? AND year = ?;", - ) - .bind(currentUser.id, now.getUTCMonth(), now.getUTCFullYear()) - .all(); - - for (const row of pointsData.results as Record[]) { - if (row.performed_at) etData.points += 10; - if (row.type === "gamenight" && row.reached_minimum_player_count) - etData.points += 10; - if ( - row.type === "rotw" && - row.answered_at - row.performed_at >= 86400000 - ) - etData.points += 10; - if (!row.performed_at && row.day < now.getUTCDate()) etData.points -= 5; - } - } } return {