cleanup daemonStatus accessors

This commit is contained in:
Joey Hess 2012-10-30 14:44:18 -04:00
parent 68118b8986
commit ea8df8fe9f
15 changed files with 29 additions and 29 deletions

View file

@ -74,9 +74,6 @@ newWebAppState = do
getAssistantY :: forall sub a. (AssistantData -> a) -> GHandler sub WebApp a
getAssistantY f = f <$> (assistantData <$> getYesod)
getDaemonStatusY :: forall sub. GHandler sub WebApp DaemonStatus
getDaemonStatusY = liftIO . getDaemonStatus =<< getAssistantY daemonStatusHandle
runAssistantY :: forall sub a. (Assistant a) -> GHandler sub WebApp a
runAssistantY a = liftIO . runAssistant a =<< assistantData <$> getYesod
@ -112,7 +109,7 @@ newNotifier selector = do
liftIO $ notificationHandleToId <$> newNotificationHandle notifier
getNotifier :: forall sub. (DaemonStatus -> NotificationBroadcaster) -> GHandler sub WebApp NotificationBroadcaster
getNotifier selector = selector <$> getDaemonStatusY
getNotifier selector = selector <$> runAssistantY getDaemonStatus
{- Adds the auth parameter as a hidden field on a form. Must be put into
- every form. -}