feat: add PostgreSQL support and enhance evaluation loading
- Added `pg` and `@types/pg` dependencies for PostgreSQL integration. - Updated `useEvaluation` hook to load user evaluations from the API, improving data management. - Refactored `saveUserEvaluation` and `loadUserEvaluation` functions to interact with the API instead of localStorage. - Introduced error handling for profile loading and evaluation saving to enhance robustness. - Added new methods for managing user profiles and evaluations, including `clearUserProfile` and `loadEvaluationForProfile`.
This commit is contained in:
12
services/index.ts
Normal file
12
services/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// Server-side services (Node.js only)
|
||||
// Note: These exports are only for server-side usage (API routes)
|
||||
// Don't import from this index in client-side code to avoid bundling server dependencies
|
||||
|
||||
// Database services (server-only)
|
||||
export { getPool, closePool } from "./database";
|
||||
|
||||
// Evaluation services (server-only)
|
||||
export { EvaluationService, evaluationService } from "./evaluation-service";
|
||||
|
||||
// API client (can be used client-side)
|
||||
export { ApiClient, apiClient } from "./api-client";
|
||||
Reference in New Issue
Block a user