功能优化

This commit is contained in:
ngfchl
2022-12-25 20:25:35 +08:00
parent 3f76e4a2a7
commit f934af8440
3 changed files with 62 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ urlpatterns = [
path(r'get_log_list', views.get_log_list, name='get_log_list'),
path(r'show_log_list', views.show_log_list, name='show_log_list'),
path(r'get_log_content', views.get_log_content, name='get_log_content'),
path(r'get_helper_license', views.get_helper_license, name='get_helper_license'),
path(r'downloading_status', views.downloading_status, name='downloading_status'),
path(r'do_sql', views.do_sql, name='do_sql'),
]

View File

@@ -986,3 +986,12 @@ def site_sort_api(request):
return JsonResponse(data=CommonResponse.error(
msg=f'数据更新失败:{e}'
).to_dict(), safe=False)
def get_helper_license(request):
result = pt_site.auto_update_license()
if result.code == 0:
return JsonResponse(data=result.to_dict(), safe=False)
return JsonResponse(data=CommonResponse.error(
msg='License更新失败'
).to_dict(), safe=False)