diff --git a/docs/src/swagger-output.json b/docs/src/swagger-output.json index 9289332f..dce141a8 100644 --- a/docs/src/swagger-output.json +++ b/docs/src/swagger-output.json @@ -4670,6 +4670,9 @@ "dateOfBirth": { "type": "string" }, + "age": { + "type": "number" + }, "jobTitle": { "type": "string" }, diff --git a/services/expo/src/utils/validationHelpers.ts b/services/expo/src/utils/validationHelpers.ts index c07048db..ccc4e33a 100644 --- a/services/expo/src/utils/validationHelpers.ts +++ b/services/expo/src/utils/validationHelpers.ts @@ -181,18 +181,6 @@ export const getEligiblePrizes = async (users: any[], req: express.Request) => { }); return dbPrizes; } - case "Horizons 2024": { - const { tracks, challenges } = prizeConfig.hexathons["Horizons 2024"]; - - const generalDBPrizes = await prisma.category.findMany({ - where: { - name: { - in: tracks.concat(challenges), - }, - }, - }); - return generalDBPrizes; - } default: { return []; @@ -404,7 +392,9 @@ export const validatePrizes = async (prizes: any[], req: express.Request) => { return { error: false }; } - + default: { + return { error: false }; + } case "HackGT X": { if ( prizeNames.filter(prize => prizeConfig.hexathons["HackGT X"].generalPrizes.includes(prize)) @@ -444,33 +434,6 @@ export const validatePrizes = async (prizes: any[], req: express.Request) => { } return { error: false }; } - - case "Horizons 2024": { - if ( - prizeNames.filter(prize => prizeConfig.hexathons["Horizons 2024"].tracks.includes(prize)) - .length === 0 - ) { - return { - error: true, - message: "You must submit to at least one track.", - }; - } - - if ( - prizeNames.filter(prize => prizeConfig.hexathons["Horizons 2024"].tracks.includes(prize)) - .length > 1 - ) { - return { - error: true, - message: "You can only submit to at most one track.", - }; - } - return { error: false }; - } - - default: { - return { error: false }; - } } }; diff --git a/services/hexathons/src/models/hexathon.ts b/services/hexathons/src/models/hexathon.ts index 924345dc..1e8d7bc7 100644 --- a/services/hexathons/src/models/hexathon.ts +++ b/services/hexathons/src/models/hexathon.ts @@ -10,7 +10,7 @@ export interface Hexathon extends mongoose.Document { endDate: Date; emailHeaderImage?: string; coverImage?: string; - isDev?: boolean; + isDev?: boolean; // ??? should not have ? } const hexathonSchema = new Schema({ diff --git a/services/registration/src/models/application.ts b/services/registration/src/models/application.ts index c5ec18f7..bb9c9e93 100644 --- a/services/registration/src/models/application.ts +++ b/services/registration/src/models/application.ts @@ -32,6 +32,7 @@ export interface Application extends mongoose.Document { applicationData: { adult?: boolean; dateOfBirth?: string; + age?: number; jobTitle?: string; company?: string; school?: string; @@ -121,6 +122,9 @@ const applicationSchema = new Schema( dateOfBirth: { type: String, }, + age: { + type: Number, + }, jobTitle: { type: String, },