diff --git a/Yesod/Auth/OAuth2/BattleNet.hs b/Yesod/Auth/OAuth2/BattleNet.hs index 1f6fb42..f4709bb 100644 --- a/Yesod/Auth/OAuth2/BattleNet.hs +++ b/Yesod/Auth/OAuth2/BattleNet.hs @@ -78,5 +78,3 @@ makeCredentials region manager token = do case r of "cn" -> "api.battlenet.com.cn" _ -> E.encodeUtf8 r <> ".api.battle.net" - - diff --git a/Yesod/Auth/OAuth2/Bitbucket.hs b/Yesod/Auth/OAuth2/Bitbucket.hs index 7e400c8..6181412 100644 --- a/Yesod/Auth/OAuth2/Bitbucket.hs +++ b/Yesod/Auth/OAuth2/Bitbucket.hs @@ -50,7 +50,7 @@ instance FromJSON BitbucketUser where parseJSON _ = mzero -data BitbucketUserLinks = BitbucketUserLinks +newtype BitbucketUserLinks = BitbucketUserLinks { bitbucketAvatarLink :: BitbucketLink } @@ -60,24 +60,24 @@ instance FromJSON BitbucketUserLinks where parseJSON _ = mzero -data BitbucketLink = BitbucketLink +newtype BitbucketLink = BitbucketLink { bitbucketLinkHref :: Text } instance FromJSON BitbucketLink where parseJSON (Object o) = BitbucketLink <$> o .: "href" - + parseJSON _ = mzero -data BitbucketEmailSearchResults = BitbucketEmailSearchResults +newtype BitbucketEmailSearchResults = BitbucketEmailSearchResults { bitbucketEmails :: [BitbucketUserEmail] } instance FromJSON BitbucketEmailSearchResults where parseJSON (Object o) = BitbucketEmailSearchResults <$> o .: "values" - + parseJSON _ = mzero data BitbucketUserEmail = BitbucketUserEmail diff --git a/Yesod/Auth/OAuth2/Upcase.hs b/Yesod/Auth/OAuth2/Upcase.hs index 32ec588..c1bb12a 100644 --- a/Yesod/Auth/OAuth2/Upcase.hs +++ b/Yesod/Auth/OAuth2/Upcase.hs @@ -41,7 +41,7 @@ instance FromJSON UpcaseUser where parseJSON _ = mzero -data UpcaseResponse = UpcaseResponse UpcaseUser +newtype UpcaseResponse = UpcaseResponse UpcaseUser instance FromJSON UpcaseResponse where parseJSON (Object o) = UpcaseResponse