From 4da5ac973fb0278b01e3e85806f324bae51e6876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EB=AF=B8=EB=9E=98?= Date: Sun, 13 Oct 2024 19:51:53 +0900 Subject: [PATCH] fix :: fix resource missing error --- .../spaced/domain/admin/application/AdminServiceMapper.java | 1 + src/main/java/com/dnd/spaced/domain/word/domain/Word.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/dnd/spaced/domain/admin/application/AdminServiceMapper.java b/src/main/java/com/dnd/spaced/domain/admin/application/AdminServiceMapper.java index 225f3e7..bacd6fd 100644 --- a/src/main/java/com/dnd/spaced/domain/admin/application/AdminServiceMapper.java +++ b/src/main/java/com/dnd/spaced/domain/admin/application/AdminServiceMapper.java @@ -37,6 +37,7 @@ public static Word fromCreateRequest(AdminWordRequestDto dto) { .meaning(dto.meaning()) .categoryName(Category.findBy(dto.category()).getName()) .example(dto.example()) + .resource(dto.resource()) .build(); } diff --git a/src/main/java/com/dnd/spaced/domain/word/domain/Word.java b/src/main/java/com/dnd/spaced/domain/word/domain/Word.java index 07b625f..c6ab66e 100644 --- a/src/main/java/com/dnd/spaced/domain/word/domain/Word.java +++ b/src/main/java/com/dnd/spaced/domain/word/domain/Word.java @@ -58,7 +58,8 @@ private Word( String englishPronunciation, String meaning, String categoryName, - String example + String example, + String resource ) { validateContent(name, meaning, example); @@ -69,6 +70,7 @@ private Word( this.meaning = meaning; this.category = Category.findBy(categoryName); this.example = example; + this.resource = resource; } public void addComment() {