From d6fe3090d7230f204efc4d84a6889d14073144d9 Mon Sep 17 00:00:00 2001 From: Freiric Barral Date: Fri, 29 Aug 2014 19:56:12 +0200 Subject: [PATCH] remove redundant bracket --- Yesod/Auth/OAuth2/Github.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Yesod/Auth/OAuth2/Github.hs b/Yesod/Auth/OAuth2/Github.hs index f998819..3b9e441 100644 --- a/Yesod/Auth/OAuth2/Github.hs +++ b/Yesod/Auth/OAuth2/Github.hs @@ -56,7 +56,7 @@ oauth2Github clientId clientSecret scopes = basicPlugin {apDispatch = dispatch} oauth = OAuth2 { oauthClientId = encodeUtf8 clientId , oauthClientSecret = encodeUtf8 clientSecret - , oauthOAuthorizeEndpoint = encodeUtf8 $ "https://github.com/login/oauth/authorize?scopes=" `T.append` (T.intercalate "," scopes) + , oauthOAuthorizeEndpoint = encodeUtf8 $ "https://github.com/login/oauth/authorize?scopes=" `T.append` T.intercalate "," scopes , oauthAccessTokenEndpoint = "https://github.com/login/oauth/access_token" , oauthCallback = Nothing } @@ -70,16 +70,16 @@ oauth2Github clientId clientSecret scopes = basicPlugin {apDispatch = dispatch} dispatch "GET" ["forward"] = do state <- liftIO $ fmap (T.pack . toString) nextRandom setSession "githubState" state - (apDispatch (withState state)) "GET" ["forward"] + apDispatch (withState state) "GET" ["forward"] dispatch "GET" ["callback"] = do state <- lift $ runInputGet $ ireq textField "state" savedState <- lookupSession "githubState" case savedState of - Just saved | saved == state -> (apDispatch basicPlugin) "GET" ["callback"] + Just saved | saved == state -> apDispatch basicPlugin "GET" ["callback"] _ -> invalidArgs ["state"] - dispatch method ps = (apDispatch basicPlugin) method ps + dispatch method ps = apDispatch basicPlugin method ps fetchGithubProfile :: Manager -> AccessToken -> IO (Creds m) fetchGithubProfile manager token = do