Not sure if this is the correct place to report this, but I can't work out where a better place might be. TL;DR: There's a mistake in the tutorial on the section about getting users by ID/e-mail.
In the section titled "More complex identifiers" on the second code sample, you list the resource name as "post", but based on the context I think that was supposed to be "user". Specifically I think this is the incorrect snippet:
resource :: Resource IO (ReaderT UserId IO) UserId Void Void
resource = mkResourceReader
{ R.name = "post"
, R.schema = noListing $ named [ ( "email", singleBy ByEmail )
, ( "id" , singleRead ById )
]
, R.get = Just get
}
resource :: Resource IO (ReaderT UserId IO) UserId Void Void
resource = mkResourceReader
{ R.name = "user"
, R.schema = noListing $ named [ ( "email", singleBy ByEmail )
, ( "id" , singleRead ById )
]
, R.get = Just get
}