功能变化: 请求方式列表中,添加PATCH请求方式

pull/60/head
李强 2022-05-31 01:17:09 +08:00
parent 4a9c2ea549
commit 5b53331f80
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class CustomPermission(BasePermission):
else:
api = request.path # 当前请求接口
method = request.method # 当前请求方法
methodList = ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
methodList = ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH']
method = methodList.index(method)
# ***接口白名单***
api_white_list = ApiWhiteList.objects.values(permission__api=F('url'), permission__method=F('method'))