From b0e90c2f639fd4885f934caa4a27dbb2bcc532d1 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Fri, 2 Apr 2021 18:05:42 +0430 Subject: [PATCH] use the correct endpoint --- .../ir/armor/tachidesk/server/JavalinSetup.kt | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt b/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt index 0f9a049..3051935 100644 --- a/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt +++ b/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt @@ -327,27 +327,25 @@ object JavalinSetup { // expects a Tachiyomi legacy backup file to be uploaded app.get("/api/v1/backup/legacy/import") { ctx -> - - ctx.contentType("application/json") - ctx.result( - future { - createBackup( - BackupFlags( - includeManga = true, - includeCategories = true, - includeChapters = true, - includeTracking = true, - includeHistory = true, - ) - ) - } - ) + // TODO } // returns a Tachiyomi legacy backup file created from the current database app.get("/api/v1/backup/legacy/export") { ctx -> - val categoryId = ctx.pathParam("categoryId").toInt() - ctx.json(getCategoryMangaList(categoryId)) + ctx.contentType("application/json") + ctx.result( + future { + createBackup( + BackupFlags( + includeManga = true, + includeCategories = true, + includeChapters = true, + includeTracking = true, + includeHistory = true, + ) + ) + } + ) } } }