diff --git a/routes/calendar.routes.js b/routes/calendar.routes.js index 5cecd0d..931e5c9 100644 --- a/routes/calendar.routes.js +++ b/routes/calendar.routes.js @@ -114,14 +114,15 @@ async function getCalendarClient(userId = null) { } /** - * GET /api/calendar/force-oauth2 (TEMPORAIRE - DEBUG) + * GET /api/calendar/force-oauth2 (TEMPORAIRE - DEBUG - SANS AUTH) * Forcer le type d'authentification à OAuth2 + * ATTENTION : Route sans authentification, à supprimer après utilisation */ -router.get('/force-oauth2', requireAdmin, async (req, res) => { +router.get('/force-oauth2', async (req, res) => { try { await runQuery("INSERT OR REPLACE INTO settings (key, value) VALUES ('google_auth_type', 'oauth2')", []); const check = await getOne("SELECT value FROM settings WHERE key = 'google_auth_type'"); - res.json({ success: true, auth_type: check?.value }); + res.json({ success: true, auth_type: check?.value, message: 'Type changé vers OAuth2. Rechargez la page d\'administration.' }); } catch (error) { logger.error('Erreur:', error); res.status(500).json({ error: error.message });