maybeEnroll :: Handler (Maybe ExerciseId)
maybeEnroll = do
    mExId <- checkInvitationParams
    musrId <- maybeAuthId -- This is Nothing!
    $(logDebug) $ "New user: " <> tshow (mExId, musrId)
    case (mExId, musrId) of
        (Just exId, Just usrId) -> do
          $(logDebug) $ "Enrolling new user in exercise " <> tshow (fromSqlKey exId)
          setSafeSession userSessionCurrentExerciseId exId
          time   <- liftIO getCurrentTime
          void $ runDB $ upsert (UserExercise usrId exId time)
            [ UserExerciseUserId =. usrId
            , UserExerciseExerciseId =. exId
            , UserExerciseEnrolled =. time]
        _ -> pure ()
    return mExId
maybeEnroll :: Handler (Maybe ExerciseId)
maybeEnroll = do
    mExId <- checkInvitationParams
    musrId <- maybeAuthId -- This is Nothing!
    $(logDebug) $ "New user: " <> tshow (mExId, musrId)
    case (mExId, musrId) of
        (Just exId, Just usrId) -> do
          $(logDebug) $ "Enrolling new user in exercise " <> tshow (fromSqlKey exId)
          setSafeSession userSessionCurrentExerciseId exId
          time   <- liftIO getCurrentTime
          void $ runDB $ upsert (UserExercise usrId exId time)
            [ UserExerciseUserId =. usrId
            , UserExerciseExerciseId =. exId
            , UserExerciseEnrolled =. time]
        _ -> pure ()
    return mExId
maybeEnroll = do
    mExId <- checkInvitationParams
    musrId <- maybeAuthId -- This is Nothing!
    $(logDebug) $ "New user: " <> tshow (mExId, musrId)
    case (mExId, musrId) of
        (Just exId, Just usrId) -> do
          $(logDebug) $ "Enrolling new user in exercise " <> tshow (fromSqlKey exId)
          setSafeSession userSessionCurrentExerciseId exId
          time   <- liftIO getCurrentTime
          void $ runDB $ upsert (UserExercise usrId exId time)
            [ UserExerciseUserId =. usrId
            , UserExerciseExerciseId =. exId
            , UserExerciseEnrolled =. time]
        _ -> pure ()
    return mExId