Merge remote-tracking branch 'origin/sub_laptop_2' into main_laptop_1

This commit is contained in:
2026-10-09 20:53:07 +09:00
8 changed files with 207 additions and 29 deletions
@@ -1,7 +1,8 @@
"""프로젝트 구조물 집계 항목 복사본 길 — `/api/projects/{id}/items…` (PLAN 25-1b · 26-1 · 26-2b).
폴더 = 구조물 id(`structure_id` · 관 지점은 `pipe@측점`) — 같은 항목을 고른 구조물도 복사본은 따로.
GET …/items 목록(원본 · 가져온날 · 마스터바뀜 · 원본없음)
GET …/items[?folder=] 목록(원본 · 가져온날 · 마스터바뀜 · 원본없음) ·
folder = 그 폴더 하나만(고르기 모달)
POST …/items {structure, layer, owner, key} 미리 가져오기 → {폴더, 만듦, 가져온날}
POST …/items/new {structure, 경로, 이름, 단위} 새 항목(개인 층에도) · 회사 없음 409
GET …/items/{폴더}/{종류} {종류, 판, 내용}
@@ -104,9 +105,12 @@ async def _run(fn, *args):
@router.get("/{project_id}/items")
async def list_items(
project_id: str, session: dict[str, Any] = Depends(verify_session)
project_id: str,
folder: str | None = None,
session: dict[str, Any] = Depends(verify_session),
) -> dict[str, Any]:
return {"항목": await _run(copies.list_items, await _root(session, project_id))}
root = await _root(session, project_id)
return {"항목": await _run(copies.list_items, root, folder)}
@router.post("/{project_id}/items")