Merge remote-tracking branch 'origin/sub_laptop_6' into main_laptop_1
This commit is contained in:
@@ -353,15 +353,14 @@ export function crossPatchesFromCache(
|
||||
}
|
||||
|
||||
/**
|
||||
* 캐시에 얹힌 사용자 수정분을 영구저장소에 남긴다(임시저장용). 캐시가 없거나 수정분이
|
||||
* 없으면 아무것도 보내지 않는다. 저장 실패는 호출자가 처리한다.
|
||||
* 캐시에 얹힌 사용자 수정분을 영구저장소에 남긴다(노선 저장 뒤 · 임시저장용). 수정분이 없어도
|
||||
* 한 번 보냄 — 서버가 지금 종단으로 횡단을 다시 셈(429 ④ · 노선 뒤에 나간 계획고 초안).
|
||||
* 저장 실패는 호출자가 처리한다.
|
||||
*/
|
||||
export async function saveCachedCrossPatches(projectId: string, routeId: number): Promise<number> {
|
||||
const detail = cache.get(keyOf(projectId, routeId));
|
||||
if (!detail) return 0;
|
||||
const patches = crossPatchesFromCache(detail, kindChangedChainages(projectId));
|
||||
if (!patches.length) return 0;
|
||||
await saveSections(projectId, routeId, undefined, patches);
|
||||
const patches = detail ? crossPatchesFromCache(detail, kindChangedChainages(projectId)) : [];
|
||||
await saveSections(projectId, routeId, undefined, patches.length ? patches : undefined);
|
||||
clearState("kindreset", projectId); // 비울 자리를 보냈음(318-4)
|
||||
return patches.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user