diff --git a/src/Handler/Types/Status.hs b/src/Handler/Types/Status.hs index b1770e0..7abbaf8 100644 --- a/src/Handler/Types/Status.hs +++ b/src/Handler/Types/Status.hs @@ -14,7 +14,10 @@ data AppVersionRes = AppVersionRes , appVersionMinCompanion :: Maybe AppVersion } deriving (Eq, Show) instance ToJSON AppVersionRes where - toJSON AppVersionRes{ appVersionVersion } = object ["version" .= appVersionVersion] + toJSON AppVersionRes{ appVersionVersion, appVersionMinCompanion } = object $ + ["version" .= appVersionVersion] <> case appVersionMinCompanion of + Nothing -> [] + Just x -> ["minCompanion" .= x] instance ToContent AppVersionRes where toContent = toContent . toJSON