forked from forks/microblog.pub
Micropub query configuration support
This commit is contained in:
parent
ecada8480e
commit
3998d4ed68
2 changed files with 8 additions and 2 deletions
|
@ -439,9 +439,15 @@ def api_remove_from_list() -> _Response:
|
||||||
return _user_api_response()
|
return _user_api_response()
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route("/new_note", methods=["POST"]) # noqa: C901 too complex
|
@blueprint.route("/new_note", methods=["POST", "GET"]) # noqa: C901 too complex
|
||||||
@api_required
|
@api_required
|
||||||
def api_new_note() -> _Response:
|
def api_new_note() -> _Response:
|
||||||
|
# Basic Micropub (https://www.w3.org/TR/micropub/) query configuration support
|
||||||
|
if request.method == "GET" and request.args.get("q") == "config":
|
||||||
|
return jsonify({})
|
||||||
|
elif request.method == "GET":
|
||||||
|
abort(405)
|
||||||
|
|
||||||
source = None
|
source = None
|
||||||
summary = None
|
summary = None
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ def indieauth_flow():
|
||||||
def indieauth_endpoint():
|
def indieauth_endpoint():
|
||||||
if request.method == "GET":
|
if request.method == "GET":
|
||||||
if not session.get("logged_in"):
|
if not session.get("logged_in"):
|
||||||
return redirect(url_for("admin_login", next=request.url))
|
return redirect(url_for("admin.admin_login", redirect=request.url))
|
||||||
|
|
||||||
me = request.args.get("me")
|
me = request.args.get("me")
|
||||||
# FIXME(tsileo): ensure me == ID
|
# FIXME(tsileo): ensure me == ID
|
||||||
|
|
Loading…
Reference in a new issue