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);