Skip to content

Commit

Permalink
Merge pull request #8 from fga-eps-mds/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
AlvaroLeles authored Jun 30, 2023
2 parents 1a8a878 + 6dc2797 commit d3ee9f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 1 addition & 4 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
sonar.projectKey=fga-eps-mds_2023-1-schedula-gerenciador-de-tutoriais
sonar.organization=fga-eps-mds-1


sonar.host.url=https://sonarcloud.io

sonar.testExecutionReportPaths=coverage.xml
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.host.url=https://sonarcloud.io
Expand All @@ -16,7 +13,7 @@ sonar.language=ts
sonar.typescript.tsconfigPath=./tsconfig.json

sonar.tests=src
sonar.exclusions=**/metrics/*.py,/migrations/*.ts,/*.config.ts,/src/configs/**/*
sonar.exclusions=**/metrics/*.py,/migrations/*.ts,/*.config.ts,/src/configs/**/*,**/*.module.ts,/src/main.ts
sonar.test.inclusions=**/*.spec.ts

#----- Default source code encoding
Expand Down
7 changes: 5 additions & 2 deletions src/tutorials/tutorials.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ export class TutorialsController {
@Body() updateTutorialDto: UpdateTutorialDto,
@UploadedFile() file: Express.Multer.File,
): Promise<Tutorial> {
updateTutorialDto.filename = file.originalname;
updateTutorialDto.data = file.buffer;

if (file){
updateTutorialDto.filename = file.originalname;
updateTutorialDto.data = file.buffer;
}

return await this.tutorialService.updateTutorial(id, updateTutorialDto);
}
Expand Down

0 comments on commit d3ee9f4

Please sign in to comment.