Skip to content

Feature/session registration#61

Open
xoxodendroid wants to merge 6 commits intomainfrom
feature/session-registration
Open

Feature/session registration#61
xoxodendroid wants to merge 6 commits intomainfrom
feature/session-registration

Conversation

@xoxodendroid
Copy link
Collaborator

No description provided.

- Add email verification fields to User model (isEmailVerified, emailVerificationToken, emailVerificationTokenExpiry)
- Generate secure verification token on student registration
- Send verification email with link to backend API endpoint
- Create /api/users/verify-email endpoint that validates token and redirects to login
- Block login for students until email is verified
- Verification link expires after 24 hours
- Only students receive verification emails (other roles get regular confirmation)
- Add loyalty program fields to Vendor model (isLoyaltyPartner, discountRate, promoCode, termsAndConditions)
- Create getLoyaltyProgramVendors endpoint to view all GUC loyalty program partners
- Endpoint returns vendors with discount rates, promo codes, and terms & conditions
- Protected with authentication and role-based authorization
- Accessible to: Student, Staff, TA, Professor, Events Office, Admin
- Returns only vendors marked as loyalty partners
- Excludes sensitive vendor data (password, requests, upcomingEvents)
- Create documentController with getAllDocuments, viewDocument, and downloadDocument functions
- Support multiple document storage formats (base64, file paths, URLs)
- Handle documents from both bazaar and booth applicants
- Support both embedded applicants (Event model) and separate models (BazaarApplicant, BoothApplicant)
- Create documentRoutes with authentication and role-based authorization
- Endpoints accessible only to Events Office and Admin roles
- GET /api/documents - List all uploaded documents with metadata
- GET /api/documents/view/:source/:documentId - View document in browser
- GET /api/documents/download/:source/:documentId - Download document
- Proper content-type headers for different file types (images, PDFs, etc.)
- Secure file serving with authentication middleware
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.

2 participants