-
Notifications
You must be signed in to change notification settings - Fork 1
Routes
GET /auth/google
Initiates Google OAuth login process.
Redirects to Google consent screen.
GET /auth/google/callback
Handles Google OAuth callback.
Creates or updates user session.
Redirects to dashboard.
GET /auth/logout
Destroys user session.
Redirects to home page.
GET /auth/status
Returns current session status.
POST /auth/refresh
Refreshes user session.
Requires valid session cookie.
GET /api/courses
Returns list of all courses.
GET /api/courses/:id
Returns detailed course information. Includes student list and videos.
POST /api/courses
Creates new course. Requires authentication.
PUT /api/courses/:id
Updates course information. Requires course admin privileges.
DELETE /api/courses/:id
Deletes course. Requires course admin privileges.
POST /api/courses/:id/enroll
Adds user to course students. Requires authentication.
POST /api/courses/:id/leave
Removes user from course students. Requires authentication.
GET /api/courses/:id/students
Returns list of course students.
POST /api/courses/:id/videos/:videoId/complete
Marks video as complete for student. Requires course enrollment.
GET /api/courses/:id/progress
Returns student's course progress. Includes completed videos and overall progress.
GET /api/notes
Returns list of user's notes.
GET /api/notes/:id
Returns detailed note information.
POST /api/notes
Creates new note.
Requires authentication.
PUT /api/notes/:id
Updates note information.
Requires note owner privileges.
DELETE /api/notes/:id
Deletes note. Requires note owner privileges.
GET /api/profile
Returns user profile information. Requires authentication.
PUT /api/profile
Updates user profile. Requires authentication.
DELETE /api/profile
Deletes user account. Requires authentication. Requires password confirmation.
GET /api/profile/progress
Returns user's overall learning progress. Includes completed courses and videos.
All routes follow standard HTTP status codes and return error responses in the format:
AUTH_REQUIRED: Authentication required
INVALID_CREDENTIALS: Invalid login credentials
PERMISSION_DENIED: Insufficient permissions
RESOURCE_NOT_FOUND: Requested resource not found
VALIDATION_ERROR: Invalid request data
SERVER_ERROR: Internal server error