adminRoutes :: AppState -> SomeKeyPair -> ScottyM ()
adminRoutes state key = do
  get  "/admin/csr/all"           $ handleListRequests state
  get  "/admin/csr/pending"       $ handleListByStatus state Pending
  get  "/admin/csr/rejected"      $ handleListByStatus state Rejected
  get  "/admin/csr/reject/:csrid" $ handleRejectCSR state
  get  "/admin/csr/sign/:csrid"   $ handleSignCertificate state key

-- Error helper
adminRoutes :: AppState -> SomeKeyPair -> ScottyM ()
adminRoutes state key = do
  get  "/admin/csr/all"           $ handleListRequests state
  get  "/admin/csr/pending"       $ handleListByStatus state Pending
  get  "/admin/csr/rejected"      $ handleListByStatus state Rejected
  get  "/admin/csr/reject/:csrid" $ handleRejectCSR state
  get  "/admin/csr/sign/:csrid"   $ handleSignCertificate state key

-- Error helper
adminRoutes state key = do
  get  "/admin/csr/all"           $ handleListRequests state
  get  "/admin/csr/pending"       $ handleListByStatus state Pending
  get  "/admin/csr/rejected"      $ handleListByStatus state Rejected
  get  "/admin/csr/reject/:csrid" $ handleRejectCSR state
  get  "/admin/csr/sign/:csrid"   $ handleSignCertificate state key

-- Error helper