Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions uliweb_apijson/apijson/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ moment = {
settings.APIJSON_REQUESTS.[TAG_NAME]

request types currently support: POST, PUT

request configuration currently support: ADD,DISALLOW,NECESSARY (still not fully support [all the configuration items](https://github.com/TommyLemon/APIJSON/wiki#%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86))


Expand Down
4 changes: 2 additions & 2 deletions uliweb_apijson/apijson/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,14 @@ def _post_one(self,key,tag):
if not permission_check_ok:
return json({"code":400,"msg":"no permission"})

DISALLOW = request_setting_POST.get("DISALLOW")
DISALLOW = POST.get("DISALLOW")
if DISALLOW:
for field in DISALLOW:
if field in params:
log.error("request '%s' disallow '%s'"%(tag,field))
return json({"code":400,"msg":"request '%s' disallow '%s'"%(tag,field)})

NECESSARY = request_setting_POST.get("NECESSARY")
NECESSARY = POST.get("NECESSARY")
if NECESSARY:
for field in NECESSARY:
if field not in params:
Expand Down