Skip to content

Commit 1181be1

Browse files
committed
fix: Add missing OK response to routes
1 parent 53c3600 commit 1181be1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/kotlin/app/revanced/api/configuration/routes/Announcements.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ internal fun Route.announcementsRoute() = route("announcements") {
9494

9595
post<APIAnnouncement> { announcement ->
9696
announcementService.new(announcement)
97+
98+
call.respond(HttpStatusCode.OK)
9799
}
98100

99101
route("{id}") {
@@ -103,12 +105,16 @@ internal fun Route.announcementsRoute() = route("announcements") {
103105
val id: Int by call.parameters
104106

105107
announcementService.update(id, announcement)
108+
109+
call.respond(HttpStatusCode.OK)
106110
}
107111

108112
delete {
109113
val id: Int by call.parameters
110114

111115
announcementService.delete(id)
116+
117+
call.respond(HttpStatusCode.OK)
112118
}
113119

114120
route("archive") {
@@ -119,6 +125,8 @@ internal fun Route.announcementsRoute() = route("announcements") {
119125
val archivedAt = call.receiveNullable<APIAnnouncementArchivedAt>()?.archivedAt
120126

121127
announcementService.archive(id, archivedAt)
128+
129+
call.respond(HttpStatusCode.OK)
122130
}
123131
}
124132

@@ -129,6 +137,8 @@ internal fun Route.announcementsRoute() = route("announcements") {
129137
val id: Int by call.parameters
130138

131139
announcementService.unarchive(id)
140+
141+
call.respond(HttpStatusCode.OK)
132142
}
133143
}
134144
}

0 commit comments

Comments
 (0)