Complete API handlers refactoring to eliminate type switching and use repository pattern consistently

This commit is contained in:
2025-10-08 20:36:20 +02:00
parent 01b921bfa3
commit bbf728d110
16 changed files with 268 additions and 2654 deletions

View File

@@ -21,26 +21,7 @@ try {
process.exit(1);
}
// 2. Copy built library to unified binary assets
console.log('📁 Copying library to unified binary assets...');
const srcDir = './lib/dist';
const destDir = './internal/content/assets';
// Ensure destination directory exists
fs.mkdirSync(destDir, { recursive: true });
// Copy files
const files = fs.readdirSync(srcDir);
files.forEach(file => {
const src = path.join(srcDir, file);
const dest = path.join(destDir, file);
fs.copyFileSync(src, dest);
console.log(` ✅ Copied ${file}`);
});
console.log('📁 Assets copied successfully\n');
// 3. Build the unified binary
// 2. Build the unified binary
console.log('🔧 Building unified Insertr binary...');
try {
execSync('go build -o insertr .', { stdio: 'inherit' });
@@ -57,4 +38,4 @@ console.log(' • Unified Insertr binary with embedded library (./insertr)');
console.log('\n🚀 Ready to use:');
console.log(' just dev # Full-stack development');
console.log(' just serve # API server only');
console.log(' ./insertr --help # See all commands');
console.log(' ./insertr --help # See all commands');