File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export class PageService {
3737 content,
3838 emoji,
3939 workspace,
40+ node,
4041 } ) ;
4142
4243 // 페이지와 노드를 서로 연결하여 저장한다.
@@ -66,6 +67,7 @@ export class PageService {
6667 }
6768
6869 async updatePage ( id : number , dto : UpdatePageDto ) : Promise < Page > {
70+ console . log ( id , dto , 'asdfasdasd' ) ;
6971 // 갱신할 페이지를 조회한다.
7072 // 페이지를 조회한다.
7173 const page = await this . pageRepository . findOneBy ( { id } ) ;
@@ -87,7 +89,10 @@ export class PageService {
8789
8890 async findPageById ( id : number ) : Promise < Page > {
8991 // 페이지를 조회한다.
90- const page = await this . pageRepository . findOneBy ( { id } ) ;
92+ const page = await this . pageRepository . findOne ( {
93+ where : { id } ,
94+ relations : [ 'node' ] ,
95+ } ) ;
9196
9297 // 페이지가 없으면 NotFound 에러
9398 if ( ! page ) {
You can’t perform that action at this time.
0 commit comments