fix: TypeScript null check for RAG internal controller
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 55s
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 55s
This commit is contained in:
parent
fbdae9078f
commit
a0fafd0452
@ -37,13 +37,11 @@ export class InternalRagController {
|
||||
@Get('jobs/:id')
|
||||
async getJobDetail(@Param('id') id: string) {
|
||||
const job = await this.importRepo.findById(id);
|
||||
if (!job) return { job: null };
|
||||
if (!job) return { job: null, source: null };
|
||||
|
||||
let source = null;
|
||||
let downloadUrl = null;
|
||||
if (job.sourceId) {
|
||||
source = await this.sourceRepo.findById(job.sourceId);
|
||||
}
|
||||
const source = job.sourceId
|
||||
? await this.sourceRepo.findById(job.sourceId)
|
||||
: null;
|
||||
|
||||
return {
|
||||
job: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user