Skip to content

Conversation

@jasminerliu
Copy link
Contributor

  • Created team-schema.ts, team-router.ts, and team-router.test.ts, and relevant table and routes, which is referenced by StaffInfo.
  • Added optional reference to StaffInfo in UserInfo, which is only set if a User is a staff member
  • Created StaffInfo table that builds on UserInfo and references Team, and relevant routes.
  • concerned about the permission scopes i set for routes, like for creating/updating/deleting staff info i have it as admin, not sure what it should be exactly.

@jasminerliu jasminerliu force-pushed the team-and-staff-schema-routes branch from e14396d to 31edb37 Compare October 28, 2025 09:29
…user info table, and all associated routes and tests
@jasminerliu jasminerliu force-pushed the team-and-staff-schema-routes branch from 31edb37 to 12341f6 Compare October 28, 2025 09:33
@sherrylong sherrylong requested a review from J164 October 29, 2025 21:32
Copy link
Member

@J164 J164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it's necessary to associate StaffInfo with a particular user in the system. As far as I'm aware we only plan to use this to more easily update the info site. Lmk what you think

Comment on lines +62 to +63
const userInfo = staff.user as unknown as UserInfo;
const team = staff.team as unknown as Team;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems kinda cursed. Why do we need these casts?

Comment on lines +228 to +232
z.object({
userId: UserIdSchema,
name: z.string(),
email: z.string(),
}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we define this as a separate variable? (like AttendeeInfoSchema)

Comment on lines +104 to +107
const userInfo = await Models.UserInfo.findOne({ userId });
if (!userInfo) {
return res.status(StatusCode.ClientErrorNotFound).json(UserNotFoundError);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this feature would work even if the user has never signed in. Can we avoid tying staffInfo to the actual user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants