get system status endpoint

This commit is contained in:
Lucy Cifferello
2021-05-11 22:16:25 -06:00
parent 46c2c1ef67
commit 1fa68a0ad8
4 changed files with 29 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ getAvailableAppVersions rootDirectory ext@(Extension appId) = do
getSubDirectories path = (fmap (fromRight []) . try @SomeException $ listDirectory path)
>>= filterM (doesDirectoryExist . (path </>))
-- this works for both service versions and embassyOS versions
getMostRecentAppVersion :: KnownSymbol a => FilePath -> Extension a -> IO (Maybe RegisteredAppVersion)
getMostRecentAppVersion rootDirectory ext = do
allVersions <- liftIO $ getAvailableAppVersions rootDirectory ext