Skip to content

Commit

Permalink
hotfix: id not mapped in IndexCardMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
7ubi committed Aug 14, 2024
1 parent ebf364c commit 59f97fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ export class IndexcardQuizComponent implements OnInit {
}

getIndexCard(): IndexCardResponse | undefined {
return this.indexCards![this.index];
if (!this.indexCards) {
return undefined;
}
return this.indexCards[this.index];
}

createAssessmentRequest(assessment: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public interface IndexCardMapper {

List<IndexCardResponse> mapToResponses(List<IndexCard> indexCards);

@Mapping(source = "indexcardId", target = "indexCardId")
@Mapping(target = "question", expression = "java(String.valueOf(java.nio.charset.StandardCharsets.UTF_8.decode(java.nio.ByteBuffer.wrap(indexCard.getQuestion()))))")
@Mapping(target = "answer", expression = "java(String.valueOf(java.nio.charset.StandardCharsets.UTF_8.decode(java.nio.ByteBuffer.wrap(indexCard.getAnswer()))))")
IndexCardResponse mapToResponse(IndexCard indexCard);
Expand Down

0 comments on commit 59f97fd

Please sign in to comment.