-
Notifications
You must be signed in to change notification settings - Fork 9
Sync up with dev #26
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
Sync up with dev #26
Changes from all commits
75af527
8075297
3af96fa
8079618
91dc6a7
50fc6d3
c49dbe1
1f32d61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ import { | |
| } from 'src/dto/reviewType.dto'; | ||
| import { PrismaService } from '../../shared/modules/global/prisma.service'; | ||
| import { LoggerService } from '../../shared/modules/global/logger.service'; | ||
| import { PaginatedResponse, PaginationDto } from '../../dto/pagination.dto'; | ||
| import { PaginationDto } from '../../dto/pagination.dto'; | ||
| import { SortDto } from '../../dto/sort.dto'; | ||
| import { PrismaErrorService } from '../../shared/modules/global/prisma-error.service'; | ||
|
|
||
|
|
@@ -171,6 +171,7 @@ export class ReviewTypeController { | |
| UserRole.Admin, | ||
| UserRole.Submitter, | ||
| UserRole.Reviewer, | ||
| UserRole.Talent, | ||
| ) | ||
| @Scopes(Scope.ReadReviewType) | ||
| @ApiOperation({ | ||
|
|
@@ -187,7 +188,7 @@ export class ReviewTypeController { | |
| @Query() queryDto: ReviewTypeQueryDto, | ||
| @Query() paginationDto?: PaginationDto, | ||
| @Query() sortDto?: SortDto, | ||
| ): Promise<PaginatedResponse<ReviewTypeResponseDto>> { | ||
| ): Promise<ReviewTypeResponseDto[]> { | ||
| this.logger.log( | ||
| `Getting review types with filters - ${JSON.stringify(queryDto)}`, | ||
| ); | ||
|
|
@@ -234,15 +235,7 @@ export class ReviewTypeController { | |
| `Found ${reviewTypes.length} review types (page ${page} of ${Math.ceil(totalCount / perPage)})`, | ||
| ); | ||
|
|
||
| return { | ||
| data: reviewTypes as ReviewTypeResponseDto[], | ||
| meta: { | ||
| page, | ||
| perPage, | ||
| totalCount, | ||
| totalPages: Math.ceil(totalCount / perPage), | ||
| }, | ||
| }; | ||
| return reviewTypes as ReviewTypeResponseDto[]; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The removal of the |
||
| } catch (error) { | ||
| const errorResponse = this.prismaErrorService.handleError( | ||
| error, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ import { | |
| ArtifactsListResponseDto, | ||
| } from 'src/dto/artifacts.dto'; | ||
| import { LoggerService } from '../../shared/modules/global/logger.service'; | ||
| import { PaginatedResponse, PaginationDto } from '../../dto/pagination.dto'; | ||
| import { PaginationDto } from '../../dto/pagination.dto'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| import { SortDto } from '../../dto/sort.dto'; | ||
| import { SubmissionService } from './submission.service'; | ||
| import { JwtUser } from 'src/shared/modules/global/jwt.service'; | ||
|
|
@@ -150,6 +150,7 @@ export class SubmissionController { | |
| UserRole.Admin, | ||
| UserRole.Submitter, | ||
| UserRole.Reviewer, | ||
| UserRole.Talent, | ||
| ) | ||
| @Scopes(Scope.ReadSubmission) | ||
| @ApiOperation({ | ||
|
|
@@ -166,11 +167,16 @@ export class SubmissionController { | |
| @Query() queryDto: SubmissionQueryDto, | ||
| @Query() paginationDto?: PaginationDto, | ||
| @Query() sortDto?: SortDto, | ||
| ): Promise<PaginatedResponse<SubmissionResponseDto>> { | ||
| ): Promise<SubmissionResponseDto[]> { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The return type of the function has been changed from |
||
| this.logger.log( | ||
| `Getting submissions with filters - ${JSON.stringify(queryDto)}`, | ||
| ); | ||
| return this.service.listSubmission(queryDto, paginationDto, sortDto); | ||
| const paginatedData = await this.service.listSubmission( | ||
| queryDto, | ||
| paginationDto, | ||
| sortDto, | ||
| ); | ||
| return paginatedData.data; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The method now returns |
||
| } | ||
|
|
||
| @Get('/:submissionId') | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.