Skip to content
Merged

Dev #147

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/functions/attend-event/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const attendEvent: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (ev
}

if (event.body.points) {
const points = db.getCollection('s25-points-syst');
const points = db.getCollection('f25-points-syst');
const userPoints = await points.findOne({ email: event.body.qr });
if (!userPoints) {
await points.insertOne({
Expand Down
2 changes: 1 addition & 1 deletion src/functions/get-buy-ins/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const getBuyIns: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (even
// Connect to DB
const db = MongoDB.getInstance(process.env.MONGO_URI);
await db.connect();
const points = db.getCollection('s25-points-syst');
const points = db.getCollection('f25-points-syst');

const buyIns = await points
.aggregate([
Expand Down
2 changes: 1 addition & 1 deletion src/functions/leaderboard/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const leaderboard: APIGatewayProxyHandler = async () => {
try {
const db = MongoDB.getInstance(process.env.MONGO_URI);
await db.connect();
const points = db.getCollection('s25-points-syst');
const points = db.getCollection('f25-points-syst');

const topPlayers = await points
.aggregate([
Expand Down
2 changes: 1 addition & 1 deletion src/functions/points/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const points: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (event)
const db = MongoDB.getInstance(process.env.MONGO_URI);
await db.connect();
const users = db.getCollection('users');
const pointsCollection = db.getCollection('s25-points-syst');
const pointsCollection = db.getCollection('f25-points-syst');

// Make sure user exists
const user = await users.findOne({ email: email });
Expand Down
2 changes: 1 addition & 1 deletion src/functions/update-buy-ins/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const updateBuyIns: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (e
// connect to DB
const db = MongoDB.getInstance(process.env.MONGO_URI);
await db.connect();
const pointCollection = db.getCollection('s25-points-syst');
const pointCollection = db.getCollection('f25-points-syst');
const userPoints = await pointCollection.findOne({ email: event.body.email });

if (!userPoints || !userPoints.total_points) {
Expand Down