• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

BoardsService에 getAllBoards property가 없다고 나옵니다

22.12.27 16:51 작성 조회수 345

0

안녕하세요! 좋은 강의 무료로 제공해주셔서 정말 감사합니다!

다름이 아니라 강의 초반 board api 작성중인데요!

강의와 똑같이 board controller에서 boardService DI하고 getAllBoards, createBoard 메서드를 불러왔는데, 아래와 같은 에러가 발생합니다

어떻게 처리하면 될지 알려주시면 정말 감사드리겠습니다!

boards.service.ts

boards.controller.ts

Error log

src/boards/boards.controller.ts:2:23 - error TS2306: File '/Users/jeongsoi/project/maumlab/src/boards/board.model.ts' is not a module.

2 import { Board } from './board.model';
                        ~~~~~~~~~~~~~~~

src/boards/boards.controller.ts:15:35 - error TS2339: Property 'getAllBoards' does not exist on type 'BoardsService'.

15         return this.boardsService.getAllBoards();
                                     ~~~~~~~~~~~~

src/boards/boards.controller.ts:22:35 - error TS2339: Property 'createBoard' does not exist on type 'BoardsService'.

22         return this.boardsService.createBoard(title, description);

 

답변 0

답변을 작성해보세요.

답변을 기다리고 있는 질문이에요.
첫번째 답변을 남겨보세요!