This commit is contained in:
2020-11-03 18:20:12 +01:00
parent b1478fd154
commit 11caff1634
3 changed files with 5 additions and 5 deletions
@@ -36,7 +36,11 @@ class NoteService(
persistedNote
}
fun update(user: LoggedInUser, uuid: UUID, markdownText: String) = either.eager<MarkdownParsingError, PersistedNote?> {
fun update(
user: LoggedInUser,
uuid: UUID,
markdownText: String,
) = either.eager<MarkdownParsingError, PersistedNote?> {
val persistedNote = !markdownConverter.renderDocument(markdownText)
.map { it.copy(html = htmlSanitizer.sanitize(user, it.html)) }
.map { Note(it.metadata, markdown = markdownText, html = it.html) }