Merge branch 'release' into staging

This commit is contained in:
Cohee
2024-12-04 01:05:56 +02:00
2 changed files with 46 additions and 4 deletions
+8 -4
View File
@@ -604,10 +604,14 @@ router.post('/search', jsonParser, function (request, response) {
let targetGroup;
for (const groupFile of groupFiles) {
const groupData = JSON.parse(fs.readFileSync(path.join(groupDir, groupFile), 'utf8'));
if (groupData.id === group_id) {
targetGroup = groupData;
break;
try {
const groupData = JSON.parse(fs.readFileSync(path.join(groupDir, groupFile), 'utf8'));
if (groupData.id === group_id) {
targetGroup = groupData;
break;
}
} catch (error) {
console.error(groupFile, 'group file is corrupted:', error);
}
}