mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
API: extra fields for Site response
This commit is contained in:
parent
a1d3e445d3
commit
a7e2175a55
1 changed files with 7 additions and 0 deletions
|
@ -20,9 +20,16 @@ def get_site(auth):
|
|||
user = None
|
||||
|
||||
logo = g.site.logo if g.site.logo else '/static/images/logo2.png'
|
||||
logo_152 = g.site.logo_152 if g.site.logo_152 else '/static/images/apple-touch-icon.png'
|
||||
logo_32 = g.site.logo_32 if g.site.logo_32 else '/static/images/favicon-32x32.png'
|
||||
logo_16 = g.site.logo_16 if g.site.logo_16 else '/static/images/favicon-16x16.png'
|
||||
site = {
|
||||
"enable_downvotes": g.site.enable_downvotes,
|
||||
"icon": f"https://{current_app.config['SERVER_NAME']}{logo}",
|
||||
"icon_152": f"https://{current_app.config['SERVER_NAME']}{logo_152}",
|
||||
"icon_32": f"https://{current_app.config['SERVER_NAME']}{logo_32}",
|
||||
"icon_16": f"https://{current_app.config['SERVER_NAME']}{logo_16}",
|
||||
"registration_mode": g.site.registration_mode,
|
||||
"name": g.site.name,
|
||||
"actor_id": f"https://{current_app.config['SERVER_NAME']}/",
|
||||
"user_count": users_total(),
|
||||
|
|
Loading…
Reference in a new issue