mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-31 04:03:40 +00:00
compatibility matrix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user