From fa68c90ce84e1c7ae51237d88facaf77c9c61ba0 Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Fri, 3 Jul 2026 17:21:17 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=EB=A7=88=EC=BC=80=ED=8C=85=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=201.3=20->=201.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Shared/Version.xcconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Shared/Version.xcconfig b/Application/Shared/Version.xcconfig index 37b94782..5a114760 100644 --- a/Application/Shared/Version.xcconfig +++ b/Application/Shared/Version.xcconfig @@ -1,2 +1,2 @@ -MARKETING_VERSION = 1.3 +MARKETING_VERSION = 1.4 IPHONEOS_DEPLOYMENT_TARGET = 17.0 From e689c1e0e42fa9baf25ff7b4f4147cace2e36e28 Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Fri, 3 Jul 2026 17:39:24 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix=20WebPage=20=EC=82=AD=EC=A0=9C=20endpoi?= =?UTF-8?q?nt=20=EC=9D=B8=EC=BD=94=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Service/FunctionAPIEndpoint.swift | 6 +++-- .../Service/FunctionAPIEndpointTests.swift | 27 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 Application/Infra/Tests/Service/FunctionAPIEndpointTests.swift diff --git a/Application/Infra/Sources/Service/FunctionAPIEndpoint.swift b/Application/Infra/Sources/Service/FunctionAPIEndpoint.swift index 2c3fda1c..7c141eb6 100644 --- a/Application/Infra/Sources/Service/FunctionAPIEndpoint.swift +++ b/Application/Infra/Sources/Service/FunctionAPIEndpoint.swift @@ -16,12 +16,14 @@ extension FunctionAPIEndpoint where Response == EmptyAPIResponse { Self(method: .delete, path: "/todos/\(functionAPIPathSegment(id))/deletion-request") } + // WebPage id는 이미 Firestore document id로 percent-encoded된 값 + // 여기서 다시 인코딩하면 Functions가 실제 문서 id와 다른 값을 받는다 static func requestWebPageDeletion(_ id: String) -> Self { - Self(method: .post, path: "/web-pages/\(functionAPIPathSegment(id))/deletion-request") + Self(method: .post, path: "/web-pages/\(id)/deletion-request") } static func undoWebPageDeletion(_ id: String) -> Self { - Self(method: .delete, path: "/web-pages/\(functionAPIPathSegment(id))/deletion-request") + Self(method: .delete, path: "/web-pages/\(id)/deletion-request") } static func requestPushNotificationDeletion(_ id: String) -> Self { diff --git a/Application/Infra/Tests/Service/FunctionAPIEndpointTests.swift b/Application/Infra/Tests/Service/FunctionAPIEndpointTests.swift new file mode 100644 index 00000000..ff8be08c --- /dev/null +++ b/Application/Infra/Tests/Service/FunctionAPIEndpointTests.swift @@ -0,0 +1,27 @@ +// +// FunctionAPIEndpointTests.swift +// InfraTests +// +// Created by opfic on 7/3/26. +// + +import Testing +@testable import Infra + +struct FunctionAPIEndpointTests { + @Test("WebPage 삭제 endpoint는 Firestore document id를 재인코딩하지 않는다") + func WebPage_삭제_endpoint는_Firestore_document_id를_재인코딩하지_않는다() { + let id = "https%3A%2F%2Fgithub%2Ecom%2Fopficdev" + let endpoint = FunctionAPIEndpoint.requestWebPageDeletion(id) + + #expect(endpoint.path == "/web-pages/\(id)/deletion-request") + } + + @Test("WebPage 삭제 복구 endpoint는 Firestore document id를 재인코딩하지 않는다") + func WebPage_삭제_복구_endpoint는_Firestore_document_id를_재인코딩하지_않는다() { + let id = "https%3A%2F%2Fgithub%2Ecom%2Fopficdev" + let endpoint = FunctionAPIEndpoint.undoWebPageDeletion(id) + + #expect(endpoint.path == "/web-pages/\(id)/deletion-request") + } +}