From dcecd9c0c0c3c1cf639f4e3a10eae85e7c7586c7 Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 1 Feb 2019 03:12:59 -0300 Subject: [PATCH] nodeinfo: update nodeinfo to 2.1 nodeinfo 2.1 adds software.repository pointing to the repository url of the server software. quick and easy. --- litecord/blueprints/nodeinfo.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/litecord/blueprints/nodeinfo.py b/litecord/blueprints/nodeinfo.py index d2d60df..6cfd3a6 100644 --- a/litecord/blueprints/nodeinfo.py +++ b/litecord/blueprints/nodeinfo.py @@ -29,13 +29,13 @@ async def _dummy_nodeinfo_index(): return jsonify({ 'links': [{ - 'href': f'{proto}://{main_url}/nodeinfo/2.0.json', - 'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0' + 'href': f'{proto}://{main_url}/nodeinfo/2.1.json', + 'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.1' }] }) -@bp.route('/nodeinfo/2.0.json') +@bp.route('/nodeinfo/2.1.json') async def _dummy_nodeinfo(): usercount = await app.db.fetchval(""" SELECT COUNT(*) @@ -64,6 +64,7 @@ async def _dummy_nodeinfo(): 'software': { 'name': 'litecord', 'version': 'litecord v0', + 'repository': 'https://gitlab.com/litecord/litecord', }, 'services': { @@ -77,5 +78,5 @@ async def _dummy_nodeinfo(): 'total': usercount } }, - 'version': '2.0', + 'version': '2.1', })