diff --git a/src/Gitea.Repo.BranchProtections.purs b/src/Gitea.Repo.BranchProtections.purs index bbfb40b..c103f07 100644 --- a/src/Gitea.Repo.BranchProtections.purs +++ b/src/Gitea.Repo.BranchProtections.purs @@ -28,6 +28,13 @@ get u r b = do rep <- HTTP.fetch $ HTTP.GET /\ url /\ Auth.headers auth Error.tryGetRepJSON rep +list :: forall m. MonadAff m => Username -> RepoName -> GiteaT m (Record BranchProtection) +list u r = do + { auth } <- ask + url <- branchProtectionURL u r + rep <- HTTP.fetch $ HTTP.GET /\ url /\ Auth.headers auth + Error.tryGetRepJSON rep + update :: forall m patch . MonadAff m