From 3122e162cce280817103bce10ad714baa3f16566 Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Mon, 30 Mar 2026 11:30:56 +0200 Subject: [PATCH] feat: implement user authentication and management routes with multer file upload support --- .claude/settings.local.json | 4 +++- server/routes.ts | 25 +++---------------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 5f2c087..d443913 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,7 +1,9 @@ { "permissions": { "allow": [ - "WebFetch(domain:pixabay.com)" + "WebFetch(domain:pixabay.com)", + "Bash(find /c/GIT/Socialflow/migrations -name \"*.sql\" -exec wc -l {} +)", + "Bash(xargs ls:*)" ] } } diff --git a/server/routes.ts b/server/routes.ts index d2d0469..f6aea76 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -609,18 +609,7 @@ export async function registerRoutes(app: Express): Promise { const user = req.user as User; const userId = user.id; - // Check if Cloudinary is configured (shared config used for all users) - const cloudinaryConfig = await storage.getCloudinaryConfig(); - - if (!cloudinaryConfig) { - // Nettoyer le fichier temporaire - await fs.promises.unlink(req.file.path).catch(console.error); - return res.status(400).json({ - error: "Cloudinary not configured. Please ask an administrator to configure Cloudinary in Settings first." - }); - } - - // Upload to Cloudinary using file path (streamed from disk) + // Upload using file path (streamed from disk) // req.file.path est disponible avec DiskStorage const uploadResult = await cloudinaryService.uploadMedia( req.file.path, @@ -940,17 +929,9 @@ export async function registerRoutes(app: Express): Promise { // Convert to buffer const outputBuffer = await image.jpeg({ quality: 95 }).toBuffer(); - console.log("✅ Overlays applied, uploading to Cloudinary..."); + console.log("✅ Overlays applied, uploading to local storage..."); - // Check if Cloudinary is configured (shared config used for all users) - const cloudinaryConfig = await storage.getCloudinaryConfig(); - if (!cloudinaryConfig) { - return res.status(400).json({ - error: "Cloudinary not configured. Please ask an administrator to configure Cloudinary in Settings first." - }); - } - - // Upload to Cloudinary (service will use shared config internally) + // Upload to local storage const uploadResult = await cloudinaryService.uploadMedia( outputBuffer, `edited_${Date.now()}.jpg`,