FIX: Authentication for Keycloak - Phase 1

Updated core interest management endpoints:
-  server/api/create-interest.ts
-  server/api/update-interest.ts
-  server/api/delete-interest.ts
-  Created server/utils/auth.ts with dual auth support

 Next: Update ALL remaining API endpoints systematically
This commit is contained in:
2025-06-15 16:13:22 +02:00
parent 30223746e1
commit 01b770dc6c
5 changed files with 70 additions and 19 deletions

View File

@@ -0,0 +1,22 @@
export default defineEventHandler(async (event) => {
try {
const config = useRuntimeConfig().nocodb;
return {
success: true,
config: {
url: config.url,
hasToken: !!config.token,
tokenPrefix: config.token ? config.token.substring(0, 8) + '...' : 'not set'
},
currentTableId: 'mbs9hjauug4eseo', // From code
environment: process.env.NODE_ENV || 'unknown'
}
} catch (error) {
console.error('[DEBUG] NocoDB config error:', error)
return {
success: false,
error: error instanceof Error ? error.message : 'Unknown error'
}
}
})