mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
allow json requests
This commit is contained in:
parent
34a2a66027
commit
4104704a87
1 changed files with 3 additions and 0 deletions
|
@ -312,6 +312,9 @@ class _ActionsMapPlugin:
|
|||
return value
|
||||
|
||||
def wrapper(*args, **kwargs):
|
||||
if request.get_header("Content-Type") == "application/json":
|
||||
return callback((request.method, context.rule), request.json)
|
||||
|
||||
params = kwargs
|
||||
# Format boolean params
|
||||
for a in args:
|
||||
|
|
Loading…
Add table
Reference in a new issue