Add authenticated login and SSO protection
This commit is contained in:
@@ -157,11 +157,12 @@ export async function syncVideoJob(jobId: string, origin: string): Promise<Gener
|
||||
}
|
||||
}
|
||||
|
||||
export async function retryVideoJob(jobId: string, origin: string): Promise<GenerationJob> {
|
||||
export async function retryVideoJob(jobId: string, origin: string, ownerId?: string): Promise<GenerationJob> {
|
||||
const job = await getGenerationJob(jobId);
|
||||
if (!job) throw new Error(`Generation job not found: ${jobId}`);
|
||||
if (ownerId && job.ownerId !== ownerId) throw new Error(`Generation job not found: ${jobId}`);
|
||||
const input = (job.requestPayload.input || {}) as SubmitVideoJobInput;
|
||||
return submitVideoJob({ ...input, retryOf: job.id }, origin);
|
||||
return submitVideoJob({ ...input, ownerId: ownerId || job.ownerId, retryOf: job.id }, origin);
|
||||
}
|
||||
|
||||
async function completeMockVideoJob(job: GenerationJob): Promise<GenerationJob> {
|
||||
|
||||
Reference in New Issue
Block a user