mirror of https://gitlab.com/litecord/litecord.git
nodeinfo: update nodeinfo to 2.1
nodeinfo 2.1 adds software.repository pointing to the repository url of the server software. quick and easy.
This commit is contained in:
parent
d2353d2495
commit
dcecd9c0c0
|
|
@ -29,13 +29,13 @@ async def _dummy_nodeinfo_index():
|
||||||
|
|
||||||
return jsonify({
|
return jsonify({
|
||||||
'links': [{
|
'links': [{
|
||||||
'href': f'{proto}://{main_url}/nodeinfo/2.0.json',
|
'href': f'{proto}://{main_url}/nodeinfo/2.1.json',
|
||||||
'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0'
|
'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():
|
async def _dummy_nodeinfo():
|
||||||
usercount = await app.db.fetchval("""
|
usercount = await app.db.fetchval("""
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
|
|
@ -64,6 +64,7 @@ async def _dummy_nodeinfo():
|
||||||
'software': {
|
'software': {
|
||||||
'name': 'litecord',
|
'name': 'litecord',
|
||||||
'version': 'litecord v0',
|
'version': 'litecord v0',
|
||||||
|
'repository': 'https://gitlab.com/litecord/litecord',
|
||||||
},
|
},
|
||||||
|
|
||||||
'services': {
|
'services': {
|
||||||
|
|
@ -77,5 +78,5 @@ async def _dummy_nodeinfo():
|
||||||
'total': usercount
|
'total': usercount
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'version': '2.0',
|
'version': '2.1',
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue