fix build of webapp

This commit is contained in:
Joey Hess 2020-01-15 13:47:31 -04:00
parent b7e37334fe
commit fa28b51206
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 35 additions and 14 deletions

View file

@ -15,7 +15,7 @@ import Creds
import qualified Remote.WebDAV as WebDAV
import Assistant.WebApp.MakeRemote
import qualified Remote
import Types.Remote (RemoteConfig)
import Types.Remote (RemoteConfig, configParser)
import Types.StandardGroups
import Logs.Remote
import Git.Types (RemoteName)
@ -62,7 +62,9 @@ postEnableWebDAVR uuid = do
let url = fromProposedAccepted $ fromJust $ M.lookup (Accepted "url") c
mcreds <- liftAnnex $ do
dummycfg <- liftIO dummyRemoteGitConfig
getRemoteCredPairFor "webdav" c dummycfg (WebDAV.davCreds uuid)
pc <- either mempty id . parseRemoteConfig c
<$> configParser WebDAV.remote
getRemoteCredPairFor "webdav" pc dummycfg (WebDAV.davCreds uuid)
case mcreds of
Just creds -> webDAVConfigurator $ liftH $
makeWebDavRemote enableSpecialRemote name creds M.empty