migration-tools/0049-add-interface-to-check-repository-result.patch
2024-11-06 14:26:12 +08:00

47 lines
1.2 KiB
Diff

From 7cbf75c501a0c8bc21c2c9ca041b3f283ec4a0ca Mon Sep 17 00:00:00 2001
From: lixin <lixinb@uniontech.com>
Date: Fri, 10 Nov 2023 15:07:45 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=BD=AF=E4=BB=B6=E4=BB=93?=
=?UTF-8?q?=E5=BA=93=E6=A3=80=E6=B5=8B=E7=BB=93=E6=9E=9C=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/index.py b/index.py
index 9665e29..d76404e 100644
--- a/index.py
+++ b/index.py
@@ -32,6 +32,7 @@ mods = {
'check_kernel': migration.check_kernel,
'get_kernel_data': server.get_kernel_data,
'check_repo': migration.check_repo,
+ 'get_repo_data': server.get_repo_data,
}
@@ -133,6 +134,17 @@ def check_repo():
return Response(mod, content_type='application/json')
+@app.route('/get_repo_data', methods=['GET', 'POST'])
+def get_repo_data():
+ """
+ 定时检查软件仓库检测结果
+ :return:
+ """
+ mod = check_methods()
+ if mod:
+ return Response(mod, content_type='application/json')
+
+
@app.route('/', methods=['GET', 'POST'])
def MT_index():
"""
--
2.20.1