feat: implement QuestionBank CRUD with pagination and template query
- Add pagination support to findAll (page, limit query params) - Add findByTemplateId method to service - Add GET /by-template/:templateId endpoint to controller - Service already includes CRUD for QuestionBank and QuestionBankItem
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
const Database = require('better-sqlite3');
|
||||
const db = new Database('./data/metadata.db');
|
||||
|
||||
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table'").all();
|
||||
console.log('Tables:', tables.map(t => t.name));
|
||||
|
||||
const models = db.prepare("SELECT id, name, modelId, baseUrl, apiKey, isEnabled FROM model_config").all();
|
||||
console.log('Models:', JSON.stringify(models, null, 2));
|
||||
|
||||
const settings = db.prepare("SELECT tenantId, selectedLLMId FROM tenant_settings").all();
|
||||
console.log('Settings:', JSON.stringify(settings, null, 2));
|
||||
|
||||
db.close();
|
||||
Reference in New Issue
Block a user