fix: url bug

This commit is contained in:
orion 2023-11-28 12:16:47 -06:00
parent 487c4e9953
commit 2d932a22a0
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -17,10 +17,10 @@ import Simple.JSON (class WriteForeign)
import Type.Row.Subset (class Subset)
branchProtectionURL :: forall m. Monad m => Username -> RepoName -> GiteaT m URL
branchProtectionURL (Username owner) (RepoName repo) = (\{ baseURI } -> baseURI / "repos" / owner / repo) <$> ask
branchProtectionURL (Username owner) (RepoName repo) = (\{ baseURI } -> baseURI / "repos" / owner / repo / "branch_protections") <$> ask
branchProtectionOneURL :: forall m. Monad m => Username -> RepoName -> BranchProtectionName -> GiteaT m URL
branchProtectionOneURL (Username owner) (RepoName repo) (BranchProtectionName rule) = (\{ baseURI } -> baseURI / "repos" / owner / repo / "branch_protections" / rule) <$> ask
branchProtectionOneURL o r (BranchProtectionName rule) = (\base -> base / rule) <$> branchProtectionURL o r
get :: forall m. MonadAff m => Username -> RepoName -> BranchProtectionName -> GiteaT m (Record BranchProtection)
get u r b = do