Add guest Live Show opt-in toggle
This commit is contained in:
@@ -12,6 +12,7 @@ export type QueueItem = {
|
||||
blob: Blob;
|
||||
emotion_id?: number | null;
|
||||
task_id?: number | null;
|
||||
live_show_opt_in?: boolean | null;
|
||||
status: 'pending' | 'uploading' | 'done' | 'error';
|
||||
retries: number;
|
||||
nextAttemptAt?: number | null;
|
||||
|
||||
@@ -14,6 +14,9 @@ export async function createUpload(
|
||||
form.append('photo', it.blob, it.fileName);
|
||||
if (it.emotion_id) form.append('emotion_id', String(it.emotion_id));
|
||||
if (it.task_id) form.append('task_id', String(it.task_id));
|
||||
if (typeof it.live_show_opt_in === 'boolean') {
|
||||
form.append('live_show_opt_in', it.live_show_opt_in ? '1' : '0');
|
||||
}
|
||||
xhr.upload.onprogress = (ev) => {
|
||||
if (onProgress && ev.lengthComputable) {
|
||||
const pct = Math.min(100, Math.round((ev.loaded / ev.total) * 100));
|
||||
|
||||
Reference in New Issue
Block a user