Skip to content

Commit

Permalink
docs: replace leave with new fail
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Mar 20, 2024
1 parent a900a61 commit 0274606
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
override def create(authorId: AuthorId, title: Title, body: Body)(using Async, CanFail): Post =
if repository.exists(title) then leave(s"Post entitled $title already exists")
if repository.exists(title) then fail(s"Post entitled $title already exists")
val (post, author) = Async.group: // new completion group
val content = Future(verifyContent(title, body))
val author = Future(authorBy(authorId))
Expand Down

0 comments on commit 0274606

Please sign in to comment.