feat: Google Drive backup OAuth (Faz 1 — backend)
PRD "AyrisLegal Google Drive Backup & Recovery" kapsamında sadece backend altyapısı: OAuth connect/callback/status/disconnect/refresh uç noktaları, AES-256-GCM token şifreleme (tokenCrypto.ts), tek kullanımlık CSRF state (oauthState.ts), drive.file scope ile AyrisLegal/Davalar klasör oluşturma (googleDriveClient.ts). Electron tarafı (dosya tarama/kuyruk/UI) ayrı bir aşamada. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
9618ff4513
commit
328aef91bd
@@ -0,0 +1,15 @@
|
||||
import { Router } from 'express';
|
||||
import { requireAuth } from '../middleware/auth';
|
||||
import { connect, oauthCallback, getStatus, disconnect, refresh } from '../controllers/googleDrive.controller';
|
||||
|
||||
const router = Router();
|
||||
|
||||
// Google'ın doğrudan (Bearer token olmadan) yönlendirdiği tek public uç nokta.
|
||||
router.get('/oauth/callback', oauthCallback);
|
||||
|
||||
router.get('/connect', requireAuth, connect);
|
||||
router.get('/status', requireAuth, getStatus);
|
||||
router.post('/disconnect', requireAuth, disconnect);
|
||||
router.post('/refresh', requireAuth, refresh);
|
||||
|
||||
export default router;
|
||||
@@ -5,6 +5,7 @@ import precedentRoutes from './precedent.routes';
|
||||
import caseRoutes from './case.routes';
|
||||
import templateRoutes from './template.routes';
|
||||
import draftingRoutes from './drafting.routes';
|
||||
import googleDriveRoutes from './googleDrive.routes';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -17,6 +18,7 @@ router.use('/chat', chatRoutes);
|
||||
router.use('/cases', caseRoutes);
|
||||
router.use('/templates', templateRoutes);
|
||||
router.use('/drafting', draftingRoutes);
|
||||
router.use('/google-drive', googleDriveRoutes);
|
||||
router.use('/', precedentRoutes); // Keeps the same paths like /api/search-precedents
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user