Fix running w/o AP keys setup
This commit is contained in:
parent
30e1aa23e7
commit
fc7d6d3642
|
@ -2,9 +2,13 @@ import express, { Router } from "express";
|
||||||
import { promises as fs } from "fs";
|
import { promises as fs } from "fs";
|
||||||
|
|
||||||
const domain = process.env.DOMAIN;
|
const domain = process.env.DOMAIN;
|
||||||
|
const pubKeyPemPath = process.env.PUB_KEY_PEM;
|
||||||
|
|
||||||
export default async function actor(router: Router) {
|
export default async function actor(router: Router) {
|
||||||
const pubKeyPem = (await fs.readFile(process.env.PUB_KEY_PEM!)).toString();
|
if (!pubKeyPemPath) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const pubKeyPem = (await fs.readFile(pubKeyPemPath)).toString();
|
||||||
const actorObj = {
|
const actorObj = {
|
||||||
"@context": [
|
"@context": [
|
||||||
"https://www.w3.org/ns/activitystreams",
|
"https://www.w3.org/ns/activitystreams",
|
||||||
|
|
Loading…
Reference in New Issue