0a9588abb7
- 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
22 lines
723 B
JavaScript
22 lines
723 B
JavaScript
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const translationsPath = path.join('d:', 'workspace', 'AuraK', 'web', 'utils', 'translations.ts');
|
|
let content = fs.readFileSync(translationsPath, 'utf8');
|
|
|
|
// Fix the specific syntax error first: key: , -> key: "key",
|
|
const lines = content.split('\n');
|
|
const fixedLines = lines.map(line => {
|
|
const match = line.match(/^(\s+)(["']?[a-zA-Z0-9_-]+["']?):\s*,/);
|
|
if (match) {
|
|
const indent = match[1];
|
|
const key = match[2].replace(/['"]/g, '');
|
|
return `${indent}${match[2]}: "${key}",`;
|
|
}
|
|
return line;
|
|
});
|
|
|
|
fs.writeFileSync(translationsPath, fixedLines.join('\n'), 'utf8');
|
|
console.log('Fixed empty values in translations.ts!');
|