runAccounted :: Parsable t => (t -> IO a) -> OwnerMap -> (a -> ActionM ()) -> ActionM ()
runAccounted runner ownerMap liftOut = do
    name <- param "name"
    email <- header "from"
    owner <- liftIO $ atomically $ lookupCreateOwner email ownerMap
    eligible <- liftIO $ canEnqueue owner
    case eligible of
      True -> do
        owner' <- liftIO $ bumpOwner owner ownerMap -- we may want to bump *after* the action is finished
        addHeader "X-Owner" $ T.pack $ show owner'
        output <- liftIO $ runner name
        liftOut output
      False -> do
        status unauthorized401
        addHeader "X-Owner" $ T.pack $ show owner
        text $ mconcat ["quota exceeded: ", T.pack $ show owner, "\n"]
runAccounted :: Parsable t => (t -> IO a) -> OwnerMap -> (a -> ActionM ()) -> ActionM ()
runAccounted runner ownerMap liftOut = do
    name <- param "name"
    email <- header "from"
    owner <- liftIO $ atomically $ lookupCreateOwner email ownerMap
    eligible <- liftIO $ canEnqueue owner
    case eligible of
      True -> do
        owner' <- liftIO $ bumpOwner owner ownerMap -- we may want to bump *after* the action is finished
        addHeader "X-Owner" $ T.pack $ show owner'
        output <- liftIO $ runner name
        liftOut output
      False -> do
        status unauthorized401
        addHeader "X-Owner" $ T.pack $ show owner
        text $ mconcat ["quota exceeded: ", T.pack $ show owner, "\n"]
runAccounted runner ownerMap liftOut = do
    name <- param "name"
    email <- header "from"
    owner <- liftIO $ atomically $ lookupCreateOwner email ownerMap
    eligible <- liftIO $ canEnqueue owner
    case eligible of
      True -> do
        owner' <- liftIO $ bumpOwner owner ownerMap -- we may want to bump *after* the action is finished
        addHeader "X-Owner" $ T.pack $ show owner'
        output <- liftIO $ runner name
        liftOut output
      False -> do
        status unauthorized401
        addHeader "X-Owner" $ T.pack $ show owner
        text $ mconcat ["quota exceeded: ", T.pack $ show owner, "\n"]