배포
This commit is contained in:
@@ -65,4 +65,19 @@ export function markStrategyMissingFromPath(pathOnly: string): void {
|
||||
if (m) markStrategyMissingOnServer(Number(m[1]));
|
||||
}
|
||||
|
||||
/** 목록에 없는 참조 ID를 missing 으로 기록 — 삭제된 전략 404 반복 방지 */
|
||||
export function markStrategyIdsMissingUnlessValid(
|
||||
validIds: Iterable<number>,
|
||||
referencedIds: Iterable<number | null | undefined>,
|
||||
): void {
|
||||
const valid = new Set(
|
||||
[...validIds].map(id => Math.trunc(id)).filter(id => id > 0),
|
||||
);
|
||||
for (const raw of referencedIds) {
|
||||
if (raw == null) continue;
|
||||
const id = Math.trunc(raw);
|
||||
if (id > 0 && !valid.has(id)) markStrategyMissingOnServer(id);
|
||||
}
|
||||
}
|
||||
|
||||
hydrateStrategyMissingCache();
|
||||
|
||||
Reference in New Issue
Block a user