From 08b99c7d0e06eae5b71f3a389d2849d094b47e1b Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Date: Mon, 9 Oct 2023 19:44:38 -0400 Subject: [PATCH] Added env variables to api endpoint to test if it works before adapting to other endpoints --- README.md | 2 ++ api/activitypub/followers.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f6a724b1c..bfcd64585 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ This project (excluding post content itself) is released under the Apache Licens ** FIREBASE_PRIVATE_KEY ** FIREBASE_CLIENT_EMAIL ** NEXT_PUBLIC_FIREBASE_PROJECT_ID +** ACTIVITYPUB_URL +** ACTIVITYPUB_USER * Modify /layouts/partials/top_list_* to represent the section titles you want to use. * Update package.json ** Update name field diff --git a/api/activitypub/followers.ts b/api/activitypub/followers.ts index 05c192d01..c81981c6d 100644 --- a/api/activitypub/followers.ts +++ b/api/activitypub/followers.ts @@ -20,7 +20,7 @@ export default async function (req: VercelRequest, res: VercelResponse) { const output = { "@context": "https://www.w3.org/ns/activitystreams", - "id": "https://qoto.org/users/flear/following?page=1", + "id": `${process.env.ACTIVITYPUB_URL}/users/${process.env.ACTIVITYPUB_USER.toLowerCase}/following?page=1`, "type": "OrderedCollectionPage", "totalItems": actors.docs.length, "orderedItems": actors.docs.map(item=>item.get("actor")) -- GitLab