mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
adds timestamps
This commit is contained in:
committed by
Aiden McClelland
parent
ce8280b0ba
commit
27f05a4588
@@ -740,6 +740,7 @@ storeAppToAvailablePreview s@StoreApp {..} installed = AppAvailablePreview
|
||||
(storeAppVersionInfoVersion $ extract storeAppVersions)
|
||||
storeAppDescriptionShort
|
||||
installed
|
||||
storeAppTimestamp
|
||||
|
||||
type AsInstalled :: Bool -> Type
|
||||
newtype AsInstalled a = AsInstalled { unAsInstalled :: SBool a }
|
||||
|
||||
@@ -28,6 +28,7 @@ data AppAvailablePreview = AppAvailablePreview
|
||||
, appAvailablePreviewVersionLatest :: Version
|
||||
, appAvailablePreviewDescriptionShort :: Text
|
||||
, appAvailablePreviewInstallInfo :: Maybe (Version, AppStatus)
|
||||
, appAvailablePreviewTimestamp :: UTCTime
|
||||
}
|
||||
deriving (Eq, Show)
|
||||
instance ToJSON AppAvailablePreview where
|
||||
@@ -36,6 +37,7 @@ instance ToJSON AppAvailablePreview where
|
||||
, "descriptionShort" .= appAvailablePreviewDescriptionShort
|
||||
, "versionInstalled" .= (fst <$> appAvailablePreviewInstallInfo)
|
||||
, "status" .= (snd <$> appAvailablePreviewInstallInfo)
|
||||
, "latestVersionTimestamp" .= appAvailablePreviewTimestamp
|
||||
]
|
||||
|
||||
data AppInstalledPreview = AppInstalledPreview
|
||||
|
||||
1
agent/src/Lib/External/Registry.hs
vendored
1
agent/src/Lib/External/Registry.hs
vendored
@@ -135,6 +135,7 @@ parseAppData = do
|
||||
storeAppVersions <- ad .: "version-info" >>= \case
|
||||
[] -> fail "No Valid Version Info"
|
||||
(x : xs) -> pure $ x :| xs
|
||||
storeAppTimestamp <- ad .: "timestamp"
|
||||
pure StoreApp { .. }
|
||||
|
||||
getAppVersionForSpec :: (Has RegistryUrl sig m, Has (Error S9Error) sig m, MonadIO m)
|
||||
|
||||
@@ -20,6 +20,7 @@ data StoreApp = StoreApp
|
||||
, storeAppDescriptionLong :: Text
|
||||
, storeAppIconUrl :: Text
|
||||
, storeAppVersions :: NonEmpty StoreAppVersionInfo
|
||||
, storeAppTimestamp :: UTCTime
|
||||
}
|
||||
deriving (Eq, Show)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user