From f1168a931509da698394653e48425c2f80a25a1a Mon Sep 17 00:00:00 2001 From: maxmon <541182180@qq.com> Date: Thu, 13 Apr 2023 00:20:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B9=E7=9B=AE=E6=8C=89=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E9=A1=BA=E5=BA=8F=EF=BC=8C=E4=BB=8E=E6=96=B0=E5=88=B0?= =?UTF-8?q?=E6=97=A7=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- be/app/api/v1/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/be/app/api/v1/index.py b/be/app/api/v1/index.py index 7383d67..d3990b8 100644 --- a/be/app/api/v1/index.py +++ b/be/app/api/v1/index.py @@ -18,7 +18,9 @@ def index(): ret_info = ReturnInfo() try: project_config_info = [] - for project_name in os.listdir(PROJECTS): + project_list = os.listdir(PROJECTS) + project_list.sort(key=lambda x: os.path.getctime(os.path.join(PROJECTS, x)), reverse=True) + for project_name in project_list: project_config_name = PROJECT_CONFIG_PATH.format(project_name) print(project_config_name) if os.path.exists(project_config_name):