Skip to content

Commit

Permalink
Merge pull request #82 from ReflectionsProjections/dev/sdagg9/registr…
Browse files Browse the repository at this point in the history
…ation-schema

changed mechMania field to boolean
  • Loading branch information
AydanPirani authored Jun 21, 2024
2 parents ebb5c44 + 5375149 commit 9f18459
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/services/attendees/attendee-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ const AttendeeSchema = new mongoose.Schema({
userId: { type: String, required: true, unique: true },
name: { type: String, required: true },
email: { type: String, required: true, unique: true },
events: [{ type: mongoose.Schema.Types.ObjectId, ref: "Event" }],
events: [
{ type: mongoose.Schema.Types.ObjectId, ref: "Event", default: [] },
],
dietaryRestrictions: { type: [String], required: true },
allergies: { type: [String], required: true },
hasCheckedIn: { type: Boolean, default: false },
Expand Down
2 changes: 1 addition & 1 deletion src/services/auth/auth-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const RoleValidator = z.object({
userId: z.coerce.string().regex(/user[0-9]*/),
displayName: z.coerce.string(),
email: z.coerce.string().email(),
roles: z.array(Role),
roles: z.array(Role).default([]),
});

export const AuthRoleChangeRequest = z.object({
Expand Down
2 changes: 1 addition & 1 deletion src/services/events/events-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { v4 as uuidv4 } from "uuid";
export const EventType = z.enum(["A", "B", "C"]);

export const publicEventValidator = z.object({
eventId: z.coerce.string(),
eventId: z.coerce.string().default(() => uuidv4()),
name: z.string(),
startTime: z.coerce.date(),
endTime: z.coerce.date(),
Expand Down
2 changes: 1 addition & 1 deletion src/services/registration/registration-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const RegistrationSchema = new mongoose.Schema({
hearAboutRP: [{ type: String }],
portfolio: { type: String, default: null },
jobInterest: [{ type: String }],
isInterestedMechMania: { type: String },
isInterestedMechMania: { type: Boolean },
isInterestedPuzzleBang: { type: Boolean },
hasResume: { type: Boolean, default: false },
hasSubmitted: { type: Boolean, default: false },
Expand Down

0 comments on commit 9f18459

Please sign in to comment.