mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 17:04:52 +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 = concat <$> sequenceA
|
||||
[ selectAll LocalActorPerson
|
||||
[ selectAllWhere LocalActorPerson (PersonVerified ==. True)
|
||||
, selectAll LocalActorGroup
|
||||
, selectAll LocalActorRepo
|
||||
, selectAll LocalActorDeck
|
||||
|
@ -358,6 +358,14 @@ makeFoundation appSettings = do
|
|||
selectAll makeLocalActor =
|
||||
map (\ xid -> (makeLocalActor xid, env, behave actorBehavior xid)) <$>
|
||||
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 = do
|
||||
|
|
Loading…
Reference in a new issue