compatibility matrix

This commit is contained in:
Keagan McClelland
2020-02-18 11:11:32 -07:00
parent f75f06dbad
commit e8cf9cbe04
2 changed files with 27 additions and 5 deletions

View File

@@ -9,9 +9,12 @@ import Yesod.Core.Content
import Lib.Types.Semver
newtype AppVersionRes = AppVersionRes { unAppVersionRes ::AppVersion } deriving (Eq, Show)
data AppVersionRes = AppVersionRes
{ appVersionVersion :: AppVersion
, appVersionMinCompanion :: Maybe AppVersion
} deriving (Eq, Show)
instance ToJSON AppVersionRes where
toJSON AppVersionRes{ unAppVersionRes } = object ["version" .= unAppVersionRes]
toJSON AppVersionRes{ appVersionVersion } = object ["version" .= appVersionVersion]
instance ToContent AppVersionRes where
toContent = toContent . toJSON