Conversation
* log auth_url properly * Creator Restrictions and Course Feature APIs (#479) * Restore AUTH_URL environment variable
There was a problem hiding this comment.
Pull request overview
Introduces a “featured courses” mechanism by adding a featured_at timestamp to courses, exposing a public endpoint to fetch featured courses for the dashboard, and adding admin endpoints to feature/unfeature a course.
Changes:
- Add
featured_atcolumn andCourse.featured_coursesscope ordered by most recently featured. - Add public
GET /courses/featuredendpoint to return curated courses with pagination. - Add admin
POST/DELETE /admin/feature-courseendpoints to set/unsetfeatured_at, and tighten creator checks/messages in a few flows.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| db/schema.rb | Updates schema version and adds courses.featured_at. |
| db/migrate/20260607175212_add_featured_at_to_courses.rb | Migration introducing featured_at on courses. |
| config/routes.rb | Adds routes for featured courses and admin feature/unfeature endpoints. |
| app/models/course.rb | Adds featured_courses scope filtering/ordering by featured_at. |
| app/controllers/questions_controller.rb | Changes non-creator branch to raise a forbidden error (now message-driven). |
| app/controllers/courses_controller.rb | Adds featured_courses action and makes non-creator course creation explicitly forbidden. |
| app/controllers/auth_controller.rb | Updates creator-login rejection message. |
| app/controllers/admin_controller.rb | Adds feature_course / unfeature_course actions for managing featured courses. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2
to
+4
| def change | ||
| add_column :courses, :featured_at, :datetime | ||
| end |
| end | ||
| else | ||
| # Do nothing | ||
| raise Errors::ForbiddenError.new(message: "You are not a creator. Please visit https://app.studyround.com to onboard as a creator.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.