Add approve-and-live action for Live Show
This commit is contained in:
@@ -1587,6 +1587,20 @@ export async function approveLiveShowPhoto(
|
||||
return normalizePhoto(data.data);
|
||||
}
|
||||
|
||||
export async function approveAndLiveShowPhoto(
|
||||
slug: string,
|
||||
id: number,
|
||||
payload: { priority?: number } = {}
|
||||
): Promise<TenantPhoto> {
|
||||
const response = await authorizedFetch(`${eventEndpoint(slug)}/live-show/photos/${id}/approve-and-live`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
const data = await jsonOrThrow<PhotoResponse>(response, 'Failed to approve and add live show photo');
|
||||
return normalizePhoto(data.data);
|
||||
}
|
||||
|
||||
export async function rejectLiveShowPhoto(slug: string, id: number, reason?: string): Promise<TenantPhoto> {
|
||||
const response = await authorizedFetch(`${eventEndpoint(slug)}/live-show/photos/${id}/reject`, {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user