remove workaround for old yesod bug
This commit is contained in:
parent
7665773593
commit
1f5611a1ca
4 changed files with 4 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<br>
|
||||
Do you want to combine it with your existing repository at #{mainrepo}?
|
||||
<p>
|
||||
<a .btn href="@{CombineRepositoryR $ FilePathAndUUID newrepopath newrepouuid}">
|
||||
<a .btn href="@{CombineRepositoryR newrepopath newrepouuid}">
|
||||
<i .icon-resize-small></i> Combine the repositories #
|
||||
The combined repositories will sync and share their files.
|
||||
<p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue