修改api-getconfig视图的参数名称

This commit is contained in:
jayhgq 2024-09-06 23:24:12 +08:00
parent 3520699304
commit adf533c594

View File

@ -7,9 +7,9 @@ from django.views.decorators.http import require_http_methods, require_POST, req
@require_POST
def getconfig(request):
try:
param = request.POST.get("param")
title = m_api.SysConfig.objects.filter(identity=param).first().param
return HttpResponse(title)
identity = request.POST.get("param")
param = m_api.SysConfig.objects.filter(identity=identity).first().param
return HttpResponse(param)
except Exception as e:
print(f"报错了:{e}")
return HttpResponse("报错了")