Change Track.bind to use trackerId + remoteId (#842)

This commit is contained in:
Mitchell Syer
2024-01-22 21:35:56 -05:00
committed by GitHub
parent b9053e3057
commit 4bec027f11
4 changed files with 23 additions and 18 deletions

View File

@@ -105,15 +105,16 @@ object TrackController {
val bind =
handler(
queryParam<Int>("mangaId"),
queryParam<Int>("trackSearchId"),
queryParam<Int>("trackerId"),
queryParam<String>("remoteId"),
documentWith = {
withOperation {
summary("Track Record Bind")
description("Bind a Track Record to a Manga")
}
},
behaviorOf = { ctx, mangaId, trackSearchId ->
ctx.future(future { Track.bind(mangaId, trackSearchId) })
behaviorOf = { ctx, mangaId, trackerId, remoteId ->
ctx.future(future { Track.bind(mangaId, trackerId, remoteId.toLong()) })
},
withResults = {
httpCode(HttpCode.OK)