Add .json url for host-meta and fix host-meta problem of not having 'links'

This commit is contained in:
xray7224 2013-09-03 17:24:24 +01:00 committed by Jessica Tallon
parent a5682e8960
commit 1829765537
2 changed files with 7 additions and 1 deletions

View File

@ -60,6 +60,12 @@ add_route(
"mediagoblin.federation.views:host_meta"
)
add_route(
"mediagoblin.webfinger.well-known.host-meta.json",
"/.well-known/host-meta.json",
"mediagoblin.federation.views:host_meta"
)
add_route(
"mediagoblin.webfinger.whoami",
"/api/whoami",

View File

@ -120,7 +120,7 @@ def host_meta(request):
"href": request.urlgen("mediagoblin.oauth.access_token", qualified=True),
})
return json_response(links)
return json_response({"links": links})
def whoami(request):
""" This is /api/whoami - This is a HTTP redirect to api profile """