Skip to content

Conversation

@brandonkoeck
Copy link
Collaborator

Why

We needed a feature for admins to edit courses/course info

What

  • Added "Edit" action in admin course table linking to /admin/courses/[courseId]/edit
  • Implemented the Edit Course page with server-side course loading through Drizzle
  • Created an EditCourseForm with validation using React Hook Form and Zod (user must be logged in as admin)
  • Implemented a Safe Action (updateCourseAction) to update course records in the database

Satisfies

Closes (LRN-28)
https://linear.app/acmutsa/issue/LRN-28

Copy link
Collaborator

@joshuasilva414 joshuasilva414 left a comment

Choose a reason for hiding this comment

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

Looks solid! I did add next-safe-action's useAction() to get better visibility from the server. I was getting an unauthorized error before I made myself an admin, but kept getting redirected anyway as if it was successful.

@joshuasilva414 joshuasilva414 merged commit 0c03d71 into main Nov 30, 2025
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