fix is_json() check for flask 3.0
This commit is contained in:
parent
bc7f8c822d
commit
d1e0106373
|
@ -465,9 +465,11 @@ def get_api_client() -> forgejo.RepositoryApi:
|
|||
@core_bp.route("/", methods=["POST"])
|
||||
@authed_endpoint
|
||||
def req():
|
||||
if request.get_json():
|
||||
print("hello")
|
||||
if request.is_json:
|
||||
docstr, frontmatter, file_path = process_json_post()
|
||||
else:
|
||||
print(request.form)
|
||||
docstr, frontmatter, file_path = process_multipart_post()
|
||||
|
||||
frontmatter_str = yaml.dump(frontmatter)
|
||||
|
|
Loading…
Reference in New Issue