basic frontend and backend functionality. Need to test with actual livestream

This commit is contained in:
Lucas Jensen
2025-01-12 16:47:04 -08:00
parent 5b73cecee9
commit c482f6758c
12 changed files with 122 additions and 18 deletions

View File

@@ -197,16 +197,20 @@ class MainController:
"""
return self.group_controller.get_group()
async def update_group_bio(
self, bio: str, token: HTTPAuthorizationCredentials
async def update_group(
self, group: Group, token: HTTPAuthorizationCredentials
) -> Group:
"""
Updates the group's bio and returns the updated group object.
:param str bio: The new bio for the group
:param HTTPAuthorizationCredentials token: The OAuth token
:return Group: The updated group object which is suitable for a response body
"""
_, sub = self.oauth_token.email_and_sub(token)
self.user_controller.get_user_by_sub(sub)
return self.group_controller.update_group_bio(bio)
self.group_controller.update_livestream(group.livestream_id)
return self.group_controller.update_group_bio(group.bio)
async def update_livestream(
self, livestream_id: str, token: HTTPAuthorizationCredentials
) -> Group:
_, sub = self.oauth_token.email_and_sub(token)
self.user_controller.get_user_by_sub(sub)
return self.group_controller.update_livestream(livestream_id)