diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index 316e64bb4f..bd5a39179f 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -196,8 +196,8 @@ postNewRepositoryR = page "Add another repository" (Just Configuration) $ do mainrepo <- fromJust . relDir <$> liftH getYesod $(widgetFile "configurators/newrepository/combine") -getCombineRepositoryR :: FilePathAndUUID -> Handler Html -getCombineRepositoryR (FilePathAndUUID newrepopath newrepouuid) = do +getCombineRepositoryR :: FilePath -> UUID -> Handler Html +getCombineRepositoryR newrepopath newrepouuid = do r <- combineRepos newrepopath remotename liftAssistant $ syncRemote r redirect $ EditRepositoryR newrepouuid diff --git a/Assistant/WebApp/Types.hs b/Assistant/WebApp/Types.hs index 17e7c89b30..512db1ba24 100644 --- a/Assistant/WebApp/Types.hs +++ b/Assistant/WebApp/Types.hs @@ -163,15 +163,6 @@ data RemovableDrive = RemovableDrive data RepoKey = RepoKey KeyId | NoRepoKey deriving (Read, Show, Eq, Ord) -{- Only needed to work around old-yesod bug that emits a warning message - - when a route has two parameters. -} -data FilePathAndUUID = FilePathAndUUID FilePath UUID - deriving (Read, Show, Eq) - -instance PathPiece FilePathAndUUID where - toPathPiece = pack . show - fromPathPiece = readish . unpack - instance PathPiece RemovableDrive where toPathPiece = pack . show fromPathPiece = readish . unpack diff --git a/Assistant/WebApp/routes b/Assistant/WebApp/routes index 270213e8db..2db8a0fdc9 100644 --- a/Assistant/WebApp/routes +++ b/Assistant/WebApp/routes @@ -26,7 +26,7 @@ /config/repository/new/androidcamera AndroidCameraRepositoryR GET /config/repository/switcher RepositorySwitcherR GET /config/repository/switchto/#FilePath SwitchToRepositoryR GET -/config/repository/combine/#FilePathAndUUID CombineRepositoryR GET +/config/repository/combine/#FilePath/#UUID CombineRepositoryR GET /config/repository/edit/#UUID EditRepositoryR GET POST /config/repository/edit/new/#UUID EditNewRepositoryR GET POST /config/repository/edit/new/cloud/#UUID EditNewCloudRepositoryR GET POST diff --git a/templates/configurators/newrepository/combine.hamlet b/templates/configurators/newrepository/combine.hamlet index a6e7149b89..7cdec85080 100644 --- a/templates/configurators/newrepository/combine.hamlet +++ b/templates/configurators/newrepository/combine.hamlet @@ -6,7 +6,7 @@
Do you want to combine it with your existing repository at #{mainrepo}?

- + Combine the repositories # The combined repositories will sync and share their files.