diff --git a/backend/src/workspace-documents/workspace-documents.service.ts b/backend/src/workspace-documents/workspace-documents.service.ts index a32296ea..05d4dd52 100644 --- a/backend/src/workspace-documents/workspace-documents.service.ts +++ b/backend/src/workspace-documents/workspace-documents.service.ts @@ -79,7 +79,9 @@ export class WorkspaceDocumentsService { return this.findDocumentFromYorkie(doc.yorkieDocumentId).then((yorkieDoc) => { return { ...doc, - updatedAt: moment(yorkieDoc.document.updatedAt).toDate(), + updatedAt: yorkieDoc.document?.updatedAt + ? moment(yorkieDoc.document?.updatedAt).toDate() + : doc.updatedAt, }; }); }) @@ -153,7 +155,9 @@ export class WorkspaceDocumentsService { }; } - async findDocumentFromYorkie(documentKey: string): Promise { + async findDocumentFromYorkie( + documentKey: string + ): Promise { return new Promise((resolve, reject) => { const client = connect(`${this.configService.get("YORKIE_API_ADDR")}`); diff --git a/frontend/.env.development b/frontend/.env.development index be08dbc1..855fc6af 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,3 +1,3 @@ VITE_API_ADDR="http://localhost:3000" -VITE_YORKIE_API_ADDR="https://api.yorkie.dev" -VITE_YORKIE_API_KEY="cmftp10ksk14av0kc7gg" +VITE_YORKIE_API_ADDR="http://localhost:8080" +VITE_YORKIE_API_KEY=""