feat(M02): 옮기기 같은 이름 = 「이름(1)」 — 항목 · 폴더 · 여러 개 · 붙여넣기 · 복사 생성 한 벌(86-2)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgChuAcyBqUkhHMTXomQC7
This commit is contained in:
@@ -235,11 +235,12 @@ def _edit_tree(folder: Path, body: dict[str, Any]) -> dict[str, Any]:
|
||||
else: # 여러 개 — 차례로 고쳐 저장은 한 번(하나라도 막히면 아무것도 안 씀)
|
||||
if body.get("op") not in ("move", "delete") or not targets:
|
||||
raise tree.TreeError(422, "여러 개는 옮기기 · 지우기만 — 「대상」 이 필요함")
|
||||
doc, note = got["문서"], {"op": body["op"], "지운항목": []}
|
||||
doc, note = got["문서"], {"op": body["op"], "지운항목": [], "바뀐이름": []}
|
||||
for one in paste_store.outer(targets):
|
||||
step = {**body, "경로": one.get("경로"), "키": one.get("키")}
|
||||
doc, done = tree.apply(doc, step, ids)
|
||||
note["지운항목"] += done.get("지운항목", [])
|
||||
note["바뀐이름"] += done.get("바뀐이름", [])
|
||||
except tree.TreeError as e:
|
||||
raise store.StoreError(e.status, e.detail) from e
|
||||
store.write("table", store.STRUCTURE_TABLE, got["판"], doc)
|
||||
@@ -267,7 +268,7 @@ def post_paste(
|
||||
session: Session = Depends(verify_session),
|
||||
):
|
||||
"""여러 항목 · 폴더를 층 사이 붙여넣기(PLAN 30-2) — 복사한 층은 읽기 권한 · 이 층은 쓰기 권한 ·
|
||||
새 키(SC · SP) · 본뜬 = 원본 · 같은 이름 「이름 (2)」 · 폴더는 안의 것까지 → 새 나무 + 알림."""
|
||||
새 키(SC · SP) · 본뜬 = 원본 · 같은 이름 「이름(1)」 · 폴더는 안의 것까지 → 새 나무 + 알림."""
|
||||
target = _root(session, layer, owner, write=True)
|
||||
source = _root(session, body.from_layer, body.from_owner)
|
||||
who = access.grant(session, body.from_layer, body.from_owner).owner
|
||||
|
||||
Reference in New Issue
Block a user