From 95168782bcf1fc59418b86ebe6f5e7bb0b08a136 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 1 Apr 2023 10:04:42 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=81=A8=E3=82=8A=E3=81=82=E3=81=88?= =?UTF-8?q?=E3=81=9Aundo=E3=81=A7=E3=82=82=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=82=92=E8=BF=94=E3=81=95=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev/usbharu/hideout/routing/userActivityPubRouting.kt | 3 +-- .../kotlin/dev/usbharu/hideout/service/ActivityPubService.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/routing/userActivityPubRouting.kt b/src/main/kotlin/dev/usbharu/hideout/routing/userActivityPubRouting.kt index 1a795d6c..8993ecda 100644 --- a/src/main/kotlin/dev/usbharu/hideout/routing/userActivityPubRouting.kt +++ b/src/main/kotlin/dev/usbharu/hideout/routing/userActivityPubRouting.kt @@ -33,8 +33,7 @@ fun Application.userActivityPubRouting(activityPubService: ActivityPubService, a } ActivityPubService.ActivityType.Undo -> { - call.respond(HttpStatusCode.BadGateway) - TODO() + return@post call.respond(HttpStatusCode.Accepted) } } diff --git a/src/main/kotlin/dev/usbharu/hideout/service/ActivityPubService.kt b/src/main/kotlin/dev/usbharu/hideout/service/ActivityPubService.kt index 438a5f50..bc6c9f17 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/ActivityPubService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/ActivityPubService.kt @@ -15,7 +15,7 @@ class ActivityPubService() { return when(typeAsText){ "Follow" -> ActivityType.Follow "Undo" -> ActivityType.Undo - else -> throw IllegalArgumentException(typeAsText) + else -> ActivityType.Undo } } }