Add authenticated login and SSO protection
This commit is contained in:
1 parent
e36f28a668
commit
0648874801
50 files changed
+1853
-63
No files matched your search
@@ -320,12 +320,14 @@ async function syncEvolinkImageJob(job: GenerationJob, origin: string): Promise<
|
||||
});
|
||||
}
|
||||
|
||||
export async function retryImageJob(jobId: string, origin: string): Promise<GenerationJob> {
|
||||
export async function retryImageJob(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 SubmitImageJobInput;
|
||||
return submitImageJob({
|
||||
...input,
|
||||
ownerId: ownerId || job.ownerId,
|
||||
capability: job.capability as EnabledImageCapability,
|
||||
retryOf: job.id
|
||||
}, origin);
|
||||
|
||||
Reference in new issue
Block a user