insert user activity even if version and arch do not exist

This commit is contained in:
Lucy Cifferello
2022-12-02 10:34:07 -07:00
parent dd0e2557c7
commit 50aa51413e

View File

@@ -156,14 +156,10 @@ tickleMAU = do
lookupGetParam "server-id" >>= \case
Nothing -> pure ()
Just sid -> do
queryParamAs "eos-version" parseVersion >>= \case
Nothing -> pure ()
Just currentEosVersion -> do
getArchQuery >>= \case
Nothing -> pure ()
Just arch -> do
now <- liftIO getCurrentTime
void $ liftHandler $ runDB $ insertRecord $ UserActivity now sid (Just currentEosVersion) $ Just arch
currentEosVersion <- queryParamAs "eos-version" parseVersion
arch <- getArchQuery
now <- liftIO getCurrentTime
void $ liftHandler $ runDB $ insertRecord $ UserActivity now sid currentEosVersion arch
fetchCompatiblePkgVersions :: Maybe VersionRange -> PkgId -> Handler [VersionRecord]