Fix ES6 import/export mismatch in collaborate.js routes
- Import db module at top of file using ES6 import - Remove dynamic require() call that was causing ReferenceError - Database sessions now load correctly through GET /api/collaborate endpoint
This commit is contained in:
parent
de4600b4ce
commit
5a2ca101f8
@ -1,5 +1,6 @@
|
||||
import express from 'express'
|
||||
import collaborativeOrchestrator from '../services/collaborativeOrchestrator.js'
|
||||
import db from '../db/schema.js'
|
||||
|
||||
const router = express.Router()
|
||||
|
||||
@ -51,7 +52,6 @@ router.post('/', async (req, res) => {
|
||||
*/
|
||||
router.get('/', (req, res) => {
|
||||
try {
|
||||
const db = require('../db/schema.js').default
|
||||
const stmt = db.prepare(`
|
||||
SELECT
|
||||
id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user