Skip to content

New routes for event-instance, attendance, and event-tags#142

Merged
evanpetzoldt merged 1 commit intodevfrom
routes-instance-att-tag
Feb 25, 2026
Merged

New routes for event-instance, attendance, and event-tags#142
evanpetzoldt merged 1 commit intodevfrom
routes-instance-att-tag

Conversation

@evanpetzoldt
Copy link
Copy Markdown
Collaborator

@evanpetzoldt evanpetzoldt commented Feb 20, 2026

🚧 This PR is Part of the Slackbot rewrite #141

👋 TL;DR

Added routes and tests for:

  • event-instances
  • attendance
  • event-tags

Note: some of the specific routes (like /v1/event-instance/calendar-home-schedule) is pretty specific to the info I need in slackbot. I could buy an argument that this should live in the slack routes (forthcoming)

(coming soon)

  • Some org changes (additional fields not currently accessed by routes)
  • Cascade service for orgs -> events -> event-instances
  • Slackbot specific routes
  • All of the slackbot code

🥜 GIF

lack-of-hustle

@evanpetzoldt
Copy link
Copy Markdown
Collaborator Author

I see one of the CI jobs is failing, but it looks like it concerns map, not anything I added

Copy link
Copy Markdown
Contributor

@taterhead247 taterhead247 left a comment

Choose a reason for hiding this comment

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

Main thing is that these core endpoints should have anything to do with slack or a particular app.

I only got part way through. But that's the big thing I saw.

/**
* Attendance type IDs (from attendance_types table)
*/
const ATTENDANCE_TYPE_IDS = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't our orm know this? Hard coding these seems like a future failure point.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You're right, I had taken this shortcut in python and I guess the AI picked up on that. I don't expect those types to change anytime soon, but it's worth making future proof

/**
* Attendance Router
* Manages attendance records for event instances.
* Used by the slackbot for HC/Q/Co-Q operations on preblasts.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know it's just a comment. But I don't think k we should have app-specific language in the generic section.

It is an interesting question to know what apps use what. But I don't think that registry is here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep, I'll take that out

schema.users.email,
);

// Get slack user links for each attendee
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. I don't think anything slack should be in here
  2. what is this for? Probably something done inside slack?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's fair. I need the Slack user IDs so I can @mention users on Slack and other reasons.

I'm debating whether we could maybe add a query parameter to this like returnSlackIds (default false) or to create a separate endpoint for generic use cases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I strongly think these core endpoints should be neutral of apps. As basic CRUD as possible I know it'd be somewhat duplicative. But could you copy this one to a slack subfolder and make this one generic?

@evanpetzoldt
Copy link
Copy Markdown
Collaborator Author

@taterhead247 I made the changes we talked about above

@taterhead247
Copy link
Copy Markdown
Contributor

Thanks @evanpetzoldt ! FYI, it looks like this did somehow break typecheck on maps. Something about how description is undefined now. I'm still trying to track down why. I have a PR I'm working on to fix it. I already fixed the lint issue.

@taterhead247
Copy link
Copy Markdown
Contributor

ok, it's beyond me. @dnishiyama , can you please check this out locally and run pnpm typecheck and see why Moneyball's changes broke map types?

@evanpetzoldt evanpetzoldt force-pushed the routes-instance-att-tag branch from 7ef49c7 to d4f6da9 Compare February 24, 2026 13:51
Copy link
Copy Markdown
Collaborator

@dnishiyama dnishiyama left a comment

Choose a reason for hiding this comment

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

looks good!

@evanpetzoldt evanpetzoldt merged commit d88d1b0 into dev Feb 25, 2026
6 checks passed
@evanpetzoldt evanpetzoldt deleted the routes-instance-att-tag branch February 25, 2026 12:04
@github-project-automation github-project-automation bot moved this from In review to Merged in F3 Nation Tech Pull Requests Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants