From 25a688b1ada05e7bf2a713cbdac2df127dbf7104 Mon Sep 17 00:00:00 2001
From: lixin <lixinb@uniontech.com>
Date: Mon, 13 Nov 2023 09:44:30 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E5=89=8D=E7=8E=AF=E5=A2=83?=
 =?UTF-8?q?=E6=A3=80=E6=B5=8B=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 index.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/index.py b/index.py
index d76404e..2faae57 100644
--- a/index.py
+++ b/index.py
@@ -12,7 +12,6 @@ from flask import Flask, render_template, url_for, request, redirect, make_respo
 app = Flask(__name__)
 
 mods = {
-        'check_environment': migration.check_environment,
         'check_storage': migration.check_storage,
         'check_os': migration.check_os,
         'check_os_kernel': migration.check_os_kernel,
@@ -33,6 +32,7 @@ mods = {
         'get_kernel_data': server.get_kernel_data,
         'check_repo': migration.check_repo,
         'get_repo_data': server.get_repo_data,
+        'check_environment':migration.check_environment,
         }
 
 
@@ -145,6 +145,17 @@ def get_repo_data():
         return Response(mod, content_type='application/json')
 
 
+@app.route('/check_environment', methods=['GET', 'POST'])
+def check_environment():
+    """
+    agent迁移前环境检查任务
+    :return:
+    """
+    mod = check_methods()
+    if mod:
+        return Response(mod, content_type='application/json')
+
+
 @app.route('/', methods=['GET', 'POST'])
 def MT_index():
     """
-- 
2.20.1

