Initial commit

This commit is contained in:
2021-12-10 21:59:56 +01:00
commit ccfce10ffa
18 changed files with 444 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
from flask import request, abort
from functools import wraps
def json_required(f):
@wraps(f)
def call(*args, **kwargs):
if request.is_json:
return f(*args, **kwargs)
else:
abort(400, "JSON required")
return call