mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 16:54:53 +09:00
On app start, launch only verified Persons
This commit is contained in:
parent
a41356c261
commit
d5d6b0af61
1 changed files with 9 additions and 1 deletions
|
@ -344,7 +344,7 @@ makeFoundation appSettings = do
|
||||||
|
|
||||||
loadTheater :: Env -> WorkerDB [(LocalActorBy Key, Env, Verse -> Act (Either Text Text, Act (), Next))]
|
loadTheater :: Env -> WorkerDB [(LocalActorBy Key, Env, Verse -> Act (Either Text Text, Act (), Next))]
|
||||||
loadTheater env = concat <$> sequenceA
|
loadTheater env = concat <$> sequenceA
|
||||||
[ selectAll LocalActorPerson
|
[ selectAllWhere LocalActorPerson (PersonVerified ==. True)
|
||||||
, selectAll LocalActorGroup
|
, selectAll LocalActorGroup
|
||||||
, selectAll LocalActorRepo
|
, selectAll LocalActorRepo
|
||||||
, selectAll LocalActorDeck
|
, selectAll LocalActorDeck
|
||||||
|
@ -358,6 +358,14 @@ makeFoundation appSettings = do
|
||||||
selectAll makeLocalActor =
|
selectAll makeLocalActor =
|
||||||
map (\ xid -> (makeLocalActor xid, env, behave actorBehavior xid)) <$>
|
map (\ xid -> (makeLocalActor xid, env, behave actorBehavior xid)) <$>
|
||||||
selectKeysList [] []
|
selectKeysList [] []
|
||||||
|
selectAllWhere
|
||||||
|
:: (PersistRecordBackend a SqlBackend, VervisActor a)
|
||||||
|
=> (Key a -> LocalActorBy Key)
|
||||||
|
-> Filter a
|
||||||
|
-> WorkerDB [(LocalActorBy Key, Env, Verse -> Act (Either Text Text, Act (), Next))]
|
||||||
|
selectAllWhere makeLocalActor filt =
|
||||||
|
map (\ xid -> (makeLocalActor xid, env, behave actorBehavior xid)) <$>
|
||||||
|
selectKeysList [filt] []
|
||||||
|
|
||||||
startPersonLauncher :: Theater -> Env -> IO (MVar (PersonId, MVar Bool))
|
startPersonLauncher :: Theater -> Env -> IO (MVar (PersonId, MVar Bool))
|
||||||
startPersonLauncher theater env = do
|
startPersonLauncher theater env = do
|
||||||
|
|
Loading…
Reference in a new issue