Dev (#50)
* update * cleanup * fixing linting and tests errors * Refactor API Parameter Handling and Update Email Transport ✅ Updated API Route Parameters: - Changed parameter type from `{ id: string }` to `Promise<{ id: string }>` in PUT and DELETE methods for better async handling. ✅ Fixed Email Transport Creation: - Updated `nodemailer.createTransporter` to `nodemailer.createTransport` for correct transport configuration. ✅ Refactored AnalyticsDashboard Component: - Changed export from default to named export for better modularity. ✅ Enhanced Email Responder Toast: - Updated toast structure to include additional properties for better user feedback. 🎯 Overall Improvements: - Improved async handling in API routes. - Ensured correct usage of nodemailer. - Enhanced component exports and user notifications.
This commit is contained in:
23
scripts/init-db.sql
Normal file
23
scripts/init-db.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
-- Initialize database for development
|
||||
-- This script runs when the PostgreSQL container starts
|
||||
|
||||
-- Create database if it doesn't exist (this is handled by POSTGRES_DB env var)
|
||||
-- The database 'portfolio_dev' is created automatically
|
||||
|
||||
-- Create user if it doesn't exist (this is handled by POSTGRES_USER env var)
|
||||
-- The user 'portfolio_user' is created automatically
|
||||
|
||||
-- Grant permissions
|
||||
GRANT ALL PRIVILEGES ON DATABASE portfolio_dev TO portfolio_user;
|
||||
|
||||
-- Create schema if it doesn't exist
|
||||
CREATE SCHEMA IF NOT EXISTS public;
|
||||
|
||||
-- Grant schema permissions
|
||||
GRANT ALL ON SCHEMA public TO portfolio_user;
|
||||
GRANT ALL ON ALL TABLES IN SCHEMA public TO portfolio_user;
|
||||
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO portfolio_user;
|
||||
|
||||
-- Set default privileges for future tables
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO portfolio_user;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO portfolio_user;
|
||||
Reference in New Issue
Block a user