Skip to content

Commit

Permalink
fix(crucial): switch face-body error
Browse files Browse the repository at this point in the history
  • Loading branch information
woog2roid committed May 1, 2024
1 parent 03fd8c4 commit 370dda6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/domain/vr-resource/service/vr-resource-queue.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ export class VrResourceQueueService {
const requestId = this.generateRequestId(user.id);

// 1. Store file source to GCP Cloud Storage.
const faceFilePath = `3dgs-request/avatar/${requestId}/body`;
await this.vrResourceStorageRepository.uploadFile(body, faceFilePath);
const bodyImagePath = `3dgs-request/avatar/${requestId}/face`;
await this.vrResourceStorageRepository.uploadFile(face, bodyImagePath);
const bodyImagePath = `3dgs-request/avatar/${requestId}/body`;
await this.vrResourceStorageRepository.uploadFile(body, bodyImagePath);
const faceImagePath = `3dgs-request/avatar/${requestId}/face`;
await this.vrResourceStorageRepository.uploadFile(face, faceImagePath);

// 2. Store request data to Firestore.
const task: AiTaskRequest = {
Expand All @@ -88,7 +88,7 @@ export class VrResourceQueueService {
// avatar
type: 'avatar',
bodyImagePath: bodyImagePath,
faceImagePath: faceFilePath,
faceImagePath: faceImagePath,
gender: gender,
};
await this.aiTaskRequestRepository.addTask(requestId, task);
Expand Down Expand Up @@ -152,10 +152,10 @@ export class VrResourceQueueService {
const requestId = this.generateRequestId(key);

// 1. Store file source to GCP Cloud Storage.
const faceFilePath = `3dgs-request/avatar/${requestId}/body`;
await this.vrResourceStorageRepository.uploadFile(body, faceFilePath);
const bodyImagePath = `3dgs-request/avatar/${requestId}/face`;
await this.vrResourceStorageRepository.uploadFile(face, bodyImagePath);
const bodyImagePath = `3dgs-request/avatar/${requestId}/body`;
await this.vrResourceStorageRepository.uploadFile(body, bodyImagePath);
const faceImagePath = `3dgs-request/avatar/${requestId}/face`;
await this.vrResourceStorageRepository.uploadFile(face, faceImagePath);

// 2. Store request data to Firestore.
const task: SampleAiTaskRequest = {
Expand All @@ -167,7 +167,7 @@ export class VrResourceQueueService {
// avatar
type: 'avatar',
bodyImagePath: bodyImagePath,
faceImagePath: faceFilePath,
faceImagePath: faceImagePath,
gender: gender,
};
await this.sampleAiTaskRequestRepository.addTask(requestId, task);
Expand Down

0 comments on commit 370dda6

Please sign in to comment.