core: ignore check share stat of current domain

This commit is contained in:
undefined committed 2021-05-29 13:40:02 +08:00
1 parent 96a4d1fc8c
commit 105608558f
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.28.7",
"version": "2.28.8",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
+2 -1
View File
@@ -247,7 +247,8 @@ export class ProblemModel {
const l = {};
const ddocs = await Promise.all(Object.keys(parsed).map((i) => domain.get(i)));
const f = ddocs.filter((i) => !(
i?.share === '*'
i._id === domainId
|| i?.share === '*'
|| (`,${(i?.share || '').replace(/,/g, ',').split(',').map((q) => q.trim()).join(',')},`).includes(`,${domainId},`)
));
if (f.length) {