fix: return 'id' instead of 'jobId' in POST /imports response
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 46s

iOS ImportStatusResponse expects 'id' field. The mismatch caused
DecodingError.keyNotFound on the client side.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-06-18 22:27:02 +08:00
parent aef8e2a416
commit 43293a48e6
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ export class DocumentImportService {
}); });
this.logger.log(`Job enqueued: ${job.id}`); this.logger.log(`Job enqueued: ${job.id}`);
return { jobId: job.id, status: 'queued' }; return { id: job.id, status: 'queued' };
} finally { } finally {
await this.redis.unlock(lockKey, lockToken); await this.redis.unlock(lockKey, lockToken);
} }

View File

@ -96,7 +96,7 @@ export class KnowledgeSourceService {
fileName: source.originalFilename ?? source.title, fileName: source.originalFilename ?? source.title,
}); });
return { jobId: importJob.id, status: 'queued' }; return { id: importJob.id, status: 'queued' };
} }
async updateParseStatus(id: string, parseStatus: string, data?: any) { async updateParseStatus(id: string, parseStatus: string, data?: any) {