Compare commits

..

No commits in common. "7590773710c04afcc7537e1fa715c103fa76858e" and "17bdd52253988e9e936db88d29a73e1ae9eea555" have entirely different histories.

2 changed files with 1 additions and 14 deletions

View file

@ -81,4 +81,3 @@ class UserLoader(AuthUser):
id: int id: int
username: str username: str
display_name: str display_name: str
theme_color: int

View file

@ -47,8 +47,7 @@ async def health():
name = app_config.app_name, name = app_config.app_name,
post_count = await Post.count(), post_count = await Post.count(),
user_count = await User.active_count(), user_count = await User.active_count(),
me = Snowflake(current_user.id).to_b32l() if current_user else None, me = Snowflake(current_user.id).to_b32l() if current_user else None
theme_color = current_user.theme_color if current_user else 0
) )
return hi return hi
@ -161,17 +160,6 @@ async def _guild_info(gu: Guild):
badges = [] badges = []
) )
@bp.get('/guild/<b32l:gid>')
async def guild_info_id(gid: int):
async with db as session:
gu: Guild | None = (await session.execute(select(Guild).where(Guild.id == gid))).scalar()
if gu is None:
return dict(error='Not found'), 404
gj = await _guild_info(gu)
return dict(guilds={f'{Snowflake(gu.id):l}': gj})
@bp.get('/guild/@<gname>') @bp.get('/guild/@<gname>')
async def guild_info_only(gname: str): async def guild_info_only(gname: str):
async with db as session: async with db as session: