handleGetCertificate :: AppState -> ActionM ()
handleGetCertificate state = do
  certId    <- param "certid"
  maybeCert <- query' state $ RetrieveCert certId
  case maybeCert of
    Nothing    -> status notFound404
    (Just crt) -> json crt

-- * Administration functions
handleGetCertificate :: AppState -> ActionM ()
handleGetCertificate state = do
  certId    <- param "certid"
  maybeCert <- query' state $ RetrieveCert certId
  case maybeCert of
    Nothing    -> status notFound404
    (Just crt) -> json crt

-- * Administration functions
handleGetCertificate state = do
  certId    <- param "certid"
  maybeCert <- query' state $ RetrieveCert certId
  case maybeCert of
    Nothing    -> status notFound404
    (Just crt) -> json crt

-- * Administration functions