From 552fc41c5e4e0392afb277108b36659b940ec337 Mon Sep 17 00:00:00 2001 From: Andrew Pietila Date: Wed, 29 Mar 2023 23:44:26 -0500 Subject: [PATCH] We should make sure the key pair is available. --- routes/actor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/actor.js b/routes/actor.js index 941adbb..6ceacd1 100644 --- a/routes/actor.js +++ b/routes/actor.js @@ -8,7 +8,7 @@ module.exports = { * @param {express.IRoute} routeObj */ route: (routeObj) => { - routeObj.get((req, res, _next) => { + routeObj.get(async (req, res, _next) => { res.setHeader('content-type', 'application/activity+json'); res.json({ '@context': [ @@ -25,7 +25,7 @@ module.exports = { 'security:owner': { id: `https://${req.hostname}/actor` }, - 'security:publicKeyPem': getKeyPair(`https://${req.hostname}/actor`)["publicKey"] + 'security:publicKeyPem': (await getKeyPair(`https://${req.hostname}/actor`))["publicKey"] }, 'endpoints': { sharedInbox: `https://${req.hostname}/inbox`