Add access restrictions to server routes (#19)

This commit is contained in:
danieljsummers committed 2022-07-16 17:32:18 -04:00
1 parent 425223a3a8
commit eae1509d81
11 files changed
+201 -155

No files matched your search

+9
View File
@@ -454,6 +454,15 @@ type RethinkDbData (conn : Net.IConnection, config : DataConfig, log : ILogger<R
return result.Deleted > 0UL
}
member _.findById postId webLogId =
rethink<Post> {
withTable Table.Post
get postId
without [ "priorPermalinks"; "revisions" ]
resultOption; withRetryOptionDefault
}
|> verifyWebLog webLogId (fun p -> p.webLogId) <| conn
member _.findByPermalink permalink webLogId =
rethink<Post list> {
withTable Table.Post