Skip to content

Commit

Permalink
[EXD-63] Fixed return type
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-piela-ssh committed May 15, 2024
1 parent bc38b7f commit 4acb935
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/canvas/canvas-tag.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { CanvasTagService } from './canvas-tag.service';
import { CanvasTagCreateOrUpdateDTO, CanvasTagDTO } from './canvas.interface';
import { AuthenticatedGuard } from '../auth/guard/authenticated.guard';
import { Uuid } from '../common/common.interface';
import { ListFilter } from '../common/pageable.utils';
import {ListFilter, PagedResult} from '../common/pageable.utils';

@Controller('/canvas-tag')
export class CanvasTagController {
Expand All @@ -40,7 +40,9 @@ export class CanvasTagController {

@Get('/')
@UseGuards(AuthenticatedGuard)
public async readAll(@Query() filter: ListFilter): Promise<any> {
public async readAll(
@Query() filter: ListFilter,
): Promise<PagedResult<CanvasTagDTO>> {
return await this.canvasTagService.readAll(filter);
}

Expand Down
6 changes: 3 additions & 3 deletions src/canvas/canvas.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
CanvasStateFilter,
} from './canvas.interface';
import { Uuid } from '../common/common.interface';
import { ListFilter } from '../common/pageable.utils';
import {ListFilter, PagedResult} from '../common/pageable.utils';
import { AuthenticatedGuard } from '../auth/guard/authenticated.guard';
import { CanvasGuard } from './guard/canvas.guard';
import { Log } from '@algoan/nestjs-logging-interceptor';
Expand Down Expand Up @@ -231,14 +231,14 @@ export class CanvasController {
*
* @param {ListFilter} filter - The filter to apply when retrieving items.
* @param req - HTTP request object
* @return {Promise<any>} - A Promise that resolves to the retrieved items.
* @return {Promise<CanvasDTO>} - A Promise that resolves to the retrieved items.
*/
@Get('/')
@UseGuards(AuthenticatedGuard)
public async readAll(
@Query() filter: ListFilter,
@Req() req: Request,
): Promise<any> {
): Promise<PagedResult<CanvasDTO>> {
return await this.canvasService.readAll(filter, req.user.toString());
}

Expand Down

0 comments on commit 4acb935

Please sign in to comment.