debut refacto

This commit is contained in:
Tom Boullay
2026-04-14 14:18:40 +02:00
parent ab9685b6ee
commit e9ae6ffc41
13 changed files with 721 additions and 554 deletions
+26
View File
@@ -0,0 +1,26 @@
import { NextResponse } from 'next/server'
export const runtime = 'nodejs'
export const dynamic = 'force-dynamic'
// ---------------------------------------------------------------------------
// TODO: POST /api/upload/drive
//
// Upload files and push them to Google Drive.
// This route will share the same auth (lib/auth.ts), parsing (lib/parse-upload.ts),
// and Blender compression (lib/blender.ts) as the git route.
//
// Implementation steps:
// 1. Add `googleapis` package: npm install googleapis
// 2. Add env vars: GOOGLE_DRIVE_FOLDER_ID, GOOGLE_SERVICE_ACCOUNT_KEY (JSON)
// 3. Authenticate with Google Drive API using service account
// 4. Upload files to the target folder (create subfolders as needed)
// 5. Return the Drive folder URL
// ---------------------------------------------------------------------------
export async function POST() {
return NextResponse.json(
{ success: false, error: 'Google Drive upload not implemented yet' },
{ status: 501 },
)
}