Trigger subscription update from manager page

This commit is contained in:
Alex Ling
2022-01-23 09:45:45 +00:00
parent 968f6246de
commit 2c7c29fef9
5 changed files with 30 additions and 6 deletions
+17
View File
@@ -721,6 +721,23 @@ struct APIRouter
end
end
post "/api/admin/plugin/subscriptions/update" do |env|
pid = env.params.query["plugin"].as String
sid = env.params.query["subscription"].as String
Plugin.new(pid).check_subscription sid
send_json env, {
"success" => true,
}.to_json
rescue e
Logger.error e
send_json env, {
"success" => false,
"error" => e.message,
}.to_json
end
Koa.describe "Lists the chapters in a title from a plugin"
Koa.tags ["admin", "downloader"]
Koa.query "plugin", schema: String