Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Review email #861

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions apps/api/src/app/review/review.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { APIMessages } from '@shared/constants';
import { JwtAuthGuard } from '@shared/framework/auth.gaurd';
import { validateUploadStatus } from '@shared/helpers/upload.helpers';
import { Defaults, ACCESS_KEY_NAME, UploadStatusEnum, ReviewDataTypesEnum, IJwtPayload } from '@impler/shared';
import { Defaults, ACCESS_KEY_NAME, UploadStatusEnum, ReviewDataTypesEnum } from '@impler/shared';

import {
Replace,
Expand All @@ -29,7 +29,6 @@ import {
UpdateRecords,
} from './usecases';

import { UserSession } from '@shared/framework/user.decorator';
import { validateNotFound } from '@shared/helpers/common.helper';
import { DeleteRecordsDto, UpdateRecordDto, ReplaceDto } from './dtos';
import { PaginationResponseDto } from '@shared/dtos/pagination-response.dto';
Expand Down Expand Up @@ -124,7 +123,7 @@ export class ReviewController {
@ApiOperation({
summary: 'Confirm review data for uploaded file',
})
async doConfirmReview(@UserSession() user: IJwtPayload, @Param('uploadId', ValidateMongoId) _uploadId: string) {
async doConfirmReview(@Param('uploadId', ValidateMongoId) _uploadId: string) {
const uploadInformation = await this.getUpload.execute({
uploadId: _uploadId,
select: 'status _validDataFileId _invalidDataFileId totalRecords invalidRecords _templateId',
Expand All @@ -136,7 +135,7 @@ export class ReviewController {
// upload files with status reviewing can only be confirmed
validateUploadStatus(uploadInformation.status as UploadStatusEnum, [UploadStatusEnum.REVIEWING]);

return this.startProcess.execute(_uploadId, user.email);
return this.startProcess.execute(_uploadId);
}

@Put(':uploadId/record')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class StartProcess {
private paymentAPIService: PaymentAPIService
) {}

async execute(_uploadId: string, email: string) {
async execute(_uploadId: string) {
let uploadInfo = await this.uploadRepository.getUploadWithTemplate(_uploadId, ['destination']);
let importedData;
const destination = (uploadInfo._templateId as unknown as TemplateEntity)?.destination;
Expand Down Expand Up @@ -72,7 +72,7 @@ export class StartProcess {
uploadedFileId: uploadInfo._uploadedFileId,
});

return { uploadInfo, importedData, email };
return { uploadInfo, importedData };
}

async getImportedData({
Expand Down
Loading