This commit is contained in:
2025-07-31 20:15:48 +03:00
parent 3341d68c7e
commit 8ba9b7816e
15 changed files with 492 additions and 25 deletions

View File

@ -56,6 +56,19 @@ async def read_group_invite_code(
)
return invite_code
@groups_router.post("/last_feed")
async def read_group_last_feed_id(
groupname: str,
conn: Annotated[connection, Depends(get_db_connection)],
current_user: Annotated[User, Depends(get_current_user)]
):
if not check_membership_exists(conn, current_user.username, groupname) and current_user.role not in settings.settings.admin_roles:
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail="Not allowed",
)
return db.get_group_last_feed_id(conn, groupname)
@groups_router.post("/add")
async def add_group(