From bf355de715a8a2bed901d505a41f6354939ff9c4 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sat, 23 Apr 2016 18:33:41 +0000 Subject: [PATCH] Dummy git upload-pack request POST handler --- config/routes | 41 ++++++++++++++++++++------------------- src/Vervis/Handler/Git.hs | 4 ++++ 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/config/routes b/config/routes index 0b777f6..047abaa 100644 --- a/config/routes +++ b/config/routes @@ -16,41 +16,42 @@ -- Yesod misc -- ---------------------------------------------------------------------------- -/static StaticR Static appStatic -/favicon.ico FaviconR GET -/robots.txt RobotsR GET +/static StaticR Static appStatic +/favicon.ico FaviconR GET +/robots.txt RobotsR GET -- ---------------------------------------------------------------------------- -- User login -- ---------------------------------------------------------------------------- -/auth AuthR Auth getAuth +/auth AuthR Auth getAuth -- ---------------------------------------------------------------------------- -- Everything else... -- ---------------------------------------------------------------------------- -/ HomeR GET +/ HomeR GET -/u PeopleR GET POST -/u/!new PersonNewR GET -/u/#Text PersonR GET +/u PeopleR GET POST +/u/!new PersonNewR GET +/u/#Text PersonR GET -/u/#Text/k KeysR GET POST -/u/#Text/k/!new KeyNewR GET -/u/#Text/k/#Text KeyR GET +/u/#Text/k KeysR GET POST +/u/#Text/k/!new KeyNewR GET +/u/#Text/k/#Text KeyR GET -/u/#Text/p ProjectsR GET POST -/u/#Text/p/!new ProjectNewR GET -/u/#Text/p/#Text ProjectR GET +/u/#Text/p ProjectsR GET POST +/u/#Text/p/!new ProjectNewR GET +/u/#Text/p/#Text ProjectR GET -/u/#Text/r ReposR GET POST -/u/#Text/r/!new RepoNewR GET -/u/#Text/r/#Text RepoR GET -/u/#Text/r/#Text/s/#Text/+Texts RepoSourceR GET -/u/#Text/r/#Text/c RepoCommitsR GET +/u/#Text/r ReposR GET POST +/u/#Text/r/!new RepoNewR GET +/u/#Text/r/#Text RepoR GET +/u/#Text/r/#Text/s/#Text/+Texts RepoSourceR GET +/u/#Text/r/#Text/c RepoCommitsR GET -/u/#Text/r/#Text/git/info/refs GitRefDiscoverR GET +/u/#Text/r/#Text/git/info/refs GitRefDiscoverR GET +/u/#Text/r/#Text/git/git-upload-pack GitUploadRequestR POST -- /u/#Text/p/#Text/t TicketsR GET -- /u/#Text/p/#Text/t/#TicketId TicketR GET diff --git a/src/Vervis/Handler/Git.hs b/src/Vervis/Handler/Git.hs index 6103faa..897164a 100644 --- a/src/Vervis/Handler/Git.hs +++ b/src/Vervis/Handler/Git.hs @@ -15,6 +15,7 @@ module Vervis.Handler.Git ( getGitRefDiscoverR + , postGitUploadRequestR ) where @@ -53,3 +54,6 @@ getGitRefDiscoverR sharer repo = do else permissionDenied "Service not supported" _ -> notFound else notFound + +postGitUploadRequestR :: Text -> Text -> Handler Text +postGitUploadRequestR sharer repo = notFound