From f419af4deb6353fd8e3285f12ff7ab1ab92d36d9 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 19 Nov 2026 01:14:05 +0900 Subject: [PATCH] =?UTF-8?q?fix(859-8):=20B05=20=C2=B7=20B06=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=EB=AC=BC=20=EC=A0=95=EC=9D=98=20=EC=A3=BC=EC=86=8C=20?= =?UTF-8?q?=3D=20/api/m01=20=E2=80=94=20=EC=A0=95=EC=9D=98=EA=B0=80=20M01?= =?UTF-8?q?=20=EB=A1=9C=20=EC=98=AE=EA=B8=B4=20=EB=92=A4=20=EC=98=9B=20/ap?= =?UTF-8?q?i/m02=20=EC=A3=BC=EC=86=8C=20404=20=EB=A1=9C=20=EC=A0=95?= =?UTF-8?q?=EC=9D=98=20=EC=97=86=EC=9D=B4=20=EC=B2=98=EC=9D=8C=EA=B0=92=20?= =?UTF-8?q?=ED=91=9C=EB=A1=9C=20=EA=B7=B8=EB=A0=A4=EC=A7=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 종류 캐시가 받는 정의 · 판 확인 주소를 /m01/structure-definition(/version) 으로 - 시험 도우미 helper_323_9 가짜 서버 주소도 /m01 로 따라감 Co-Authored-By: Claude Opus 5.5 --- B05_Profile/B05_Profile_Api_Structures.ts | 6 +++--- B05_Profile/logic/B05_Profile_UI_Structures_Define.ts | 2 +- resources/tester/helper_323_9_definition_stamp.cjs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/B05_Profile/B05_Profile_Api_Structures.ts b/B05_Profile/B05_Profile_Api_Structures.ts index 5e2b4f362..421b187b2 100644 --- a/B05_Profile/B05_Profile_Api_Structures.ts +++ b/B05_Profile/B05_Profile_Api_Structures.ts @@ -199,14 +199,14 @@ async function requestJson(path: string, init: RequestInit = {}): Promise } } -/** 타입 레지스트리 캐시 — 정의 판(`typesVersion`)이 바뀌면(M02 저장) 버리고 다시 받음(322-0). */ +/** 타입 레지스트리 캐시 — 정의 판(`typesVersion`)이 바뀌면(M01 저장) 버리고 다시 받음(322-0). */ let typesCache: Promise | null = null; let typesVersion: number | null = null; /** 정의 판이 캐시 판과 다르면 종류 캐시를 버림 — 버렸으면 true(B05 · B06 보기를 열 때 · 탭이 다시 보일 때). */ export async function dropStaleStructureTypes(): Promise { if (!typesCache || typesVersion === null) return false; - const now = await requestJson<{ 판: number }>("/m02/structure-definition/version", { + const now = await requestJson<{ 판: number }>("/m01/structure-definition/version", { method: "GET", }) .then((payload) => payload.판) @@ -271,7 +271,7 @@ export function onStaleStructureTypes(reload: () => void): () => void { export function fetchStructureTypes(includeDisabled = false): Promise { if (!typesCache) { // 구조물 정의(48) 덧칸 — 못 받으면 옛 화면 그대로(정의 없음 = 지금 차례 · 2열) - const definition = requestJson("/m02/structure-definition", { + const definition = requestJson("/m01/structure-definition", { method: "GET", }).catch(() => null); typesCache = requestJson("/projects/structure-types", { diff --git a/B05_Profile/logic/B05_Profile_UI_Structures_Define.ts b/B05_Profile/logic/B05_Profile_UI_Structures_Define.ts index 47e6c2573..bf579fbc1 100644 --- a/B05_Profile/logic/B05_Profile_UI_Structures_Define.ts +++ b/B05_Profile/logic/B05_Profile_UI_Structures_Define.ts @@ -182,7 +182,7 @@ export function shapeFields( })); } -/** 정의 한 벌(GET /m02/structure-definition) 중 화면이 쓰는 칸. */ +/** 정의 한 벌(GET /m01/structure-definition) 중 화면이 쓰는 칸. */ export interface StructureDefinition { 판?: number; 구조물군?: Record; diff --git a/resources/tester/helper_323_9_definition_stamp.cjs b/resources/tester/helper_323_9_definition_stamp.cjs index 4af4fb1fa..d4a1fb884 100644 --- a/resources/tester/helper_323_9_definition_stamp.cjs +++ b/resources/tester/helper_323_9_definition_stamp.cjs @@ -37,8 +37,8 @@ const server = { const puts = []; const reply = (body) => ({ ok: true, status: 200, json: async () => body }); globalThis.fetch = async (url, init = {}) => { - const at = url.replace(/^.*?(?=\/(m02|projects))/, ""); - if (at === "/m02/structure-definition") return reply({ 판: NOW, types: [] }); + const at = url.replace(/^.*?(?=\/(m01|projects))/, ""); + if (at === "/m01/structure-definition") return reply({ 판: NOW, types: [] }); if (at === "/projects/structure-types") return reply({ types: [] }); if (at.endsWith("/route/structures") && init.method === "PUT") { const body = JSON.parse(init.body);