feed WIP
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user