add functionality for embedded program

This commit is contained in:
Lucas Jensen
2025-01-18 19:10:49 -08:00
parent 8c208adf4a
commit 0e150e72cc
6 changed files with 50 additions and 9 deletions

View File

@@ -39,6 +39,7 @@ export const getRoot = async (): Promise<TheGrapefruitsDuoAPI> => {
response.data.group.name,
response.data.group.bio,
response.data.group.livestream_id,
response.data.group.livestream_program_cld_id,
),
response.data.musicians.map(
(musician: MusicianObj) =>
@@ -110,6 +111,7 @@ export const getGroup = async (): Promise<GroupObj> => {
response.data.name,
response.data.bio,
response.data.livestream_id,
response.data.livestream_program_cld_id,
);
};
@@ -152,10 +154,11 @@ export const patchGroup = async (
livestream_id: string,
name: string,
user_token: string,
livestream_program_cld_id?: string,
): Promise<GroupObj> => {
const response = await api.patch(
`/group/`,
{ id, bio, livestream_id, name },
{ id, bio, livestream_id, name, livestream_program_cld_id },
{ headers: { Authorization: `Bearer ${user_token}` } },
);
return new GroupObj(
@@ -163,6 +166,7 @@ export const patchGroup = async (
response.data.name,
response.data.bio,
response.data.livestream_id,
response.data.livestream_program_cld_id,
);
};