mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 03:14:40 -05:00
fix removing manga from library not working
This commit is contained in:
@@ -166,7 +166,6 @@ class Main {
|
|||||||
// removes the manga from the library
|
// removes the manga from the library
|
||||||
app.delete("api/v1/manga/:mangaId/library") { ctx ->
|
app.delete("api/v1/manga/:mangaId/library") { ctx ->
|
||||||
val mangaId = ctx.pathParam("mangaId").toInt()
|
val mangaId = ctx.pathParam("mangaId").toInt()
|
||||||
println("fuck")
|
|
||||||
removeMangaFromLibrary(mangaId)
|
removeMangaFromLibrary(mangaId)
|
||||||
ctx.status(200)
|
ctx.status(200)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ fun addMangaToLibrary(mangaId: Int) {
|
|||||||
|
|
||||||
fun removeMangaFromLibrary(mangaId: Int) {
|
fun removeMangaFromLibrary(mangaId: Int) {
|
||||||
val manga = getManga(mangaId)
|
val manga = getManga(mangaId)
|
||||||
if (!manga.inLibrary) {
|
if (manga.inLibrary) {
|
||||||
transaction {
|
transaction {
|
||||||
MangaTable.update({ MangaTable.id eq manga.id }) {
|
MangaTable.update({ MangaTable.id eq manga.id }) {
|
||||||
it[inLibrary] = false
|
it[inLibrary] = false
|
||||||
|
|||||||
Reference in New Issue
Block a user