From 1181be12e2223b245019f64570bc8f7bef4e7dc2 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 29 Sep 2024 23:15:35 +0200 Subject: [PATCH] fix: Add missing OK response to routes --- .../revanced/api/configuration/routes/Announcements.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/kotlin/app/revanced/api/configuration/routes/Announcements.kt b/src/main/kotlin/app/revanced/api/configuration/routes/Announcements.kt index 9e39d7c..2f2ffd8 100644 --- a/src/main/kotlin/app/revanced/api/configuration/routes/Announcements.kt +++ b/src/main/kotlin/app/revanced/api/configuration/routes/Announcements.kt @@ -94,6 +94,8 @@ internal fun Route.announcementsRoute() = route("announcements") { post { announcement -> announcementService.new(announcement) + + call.respond(HttpStatusCode.OK) } route("{id}") { @@ -103,12 +105,16 @@ internal fun Route.announcementsRoute() = route("announcements") { val id: Int by call.parameters announcementService.update(id, announcement) + + call.respond(HttpStatusCode.OK) } delete { val id: Int by call.parameters announcementService.delete(id) + + call.respond(HttpStatusCode.OK) } route("archive") { @@ -119,6 +125,8 @@ internal fun Route.announcementsRoute() = route("announcements") { val archivedAt = call.receiveNullable()?.archivedAt announcementService.archive(id, archivedAt) + + call.respond(HttpStatusCode.OK) } } @@ -129,6 +137,8 @@ internal fun Route.announcementsRoute() = route("announcements") { val id: Int by call.parameters announcementService.unarchive(id) + + call.respond(HttpStatusCode.OK) } } }