From 4ca8daca29a77820571a4a9b9cc97f308cb06f44 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Fri, 28 Feb 2020 17:38:08 +0000 Subject: [PATCH] Add API to fetch download queue --- src/routes/api.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/routes/api.cr b/src/routes/api.cr index b3fbc47..940f452 100644 --- a/src/routes/api.cr +++ b/src/routes/api.cr @@ -129,5 +129,10 @@ class APIRouter < Router send_json env, {"error" => e.message}.to_json end end + + get "/api/admin/mangadex/queue" do |env| + jobs = @context.queue.get_all + send_json env, jobs.to_json + end end end