mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Fix Mypy issue
This commit is contained in:
parent
d8d9aad67a
commit
c47753c0fa
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
import json
|
import json
|
||||||
import mimetypes
|
import mimetypes
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
from flask import Response
|
from flask import Response
|
||||||
|
@ -16,7 +17,7 @@ blueprint = flask.Blueprint("well_known", __name__)
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route("/.well-known/webfinger")
|
@blueprint.route("/.well-known/webfinger")
|
||||||
def wellknown_webfinger() -> _Response:
|
def wellknown_webfinger() -> Any:
|
||||||
"""Exposes/servers WebFinger data."""
|
"""Exposes/servers WebFinger data."""
|
||||||
resource = request.args.get("resource")
|
resource = request.args.get("resource")
|
||||||
if resource not in [f"acct:{config.USERNAME}@{config.DOMAIN}", config.ID]:
|
if resource not in [f"acct:{config.USERNAME}@{config.DOMAIN}", config.ID]:
|
||||||
|
@ -52,7 +53,7 @@ def wellknown_webfinger() -> _Response:
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route("/.well-known/nodeinfo")
|
@blueprint.route("/.well-known/nodeinfo")
|
||||||
def wellknown_nodeinfo() -> _Response:
|
def wellknown_nodeinfo() -> Any:
|
||||||
"""Exposes the NodeInfo endpoint (http://nodeinfo.diaspora.software/)."""
|
"""Exposes the NodeInfo endpoint (http://nodeinfo.diaspora.software/)."""
|
||||||
return flask.jsonify(
|
return flask.jsonify(
|
||||||
links=[
|
links=[
|
||||||
|
@ -65,7 +66,7 @@ def wellknown_nodeinfo() -> _Response:
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route("/nodeinfo")
|
@blueprint.route("/nodeinfo")
|
||||||
def nodeinfo() -> _Response:
|
def nodeinfo() -> Any:
|
||||||
"""NodeInfo endpoint."""
|
"""NodeInfo endpoint."""
|
||||||
q = {
|
q = {
|
||||||
"box": Box.OUTBOX.value,
|
"box": Box.OUTBOX.value,
|
||||||
|
|
Loading…
Reference in a new issue