inital commit

This commit is contained in:
Deva Midhun 2025-05-02 12:36:36 +05:30
parent faaef129e8
commit b5aa94309b
3 changed files with 12 additions and 1 deletions

11
lib/firebase.ts Normal file
View File

@ -0,0 +1,11 @@
// lib/firebase.ts
import { initializeApp, cert } from "firebase-admin/app";
import { getFirestore } from "firebase-admin/firestore";
const serviceAccount = JSON.parse(process.env.FIREBASE_SERVICE_ACCOUNT_KEY!);
const app = initializeApp({
credential: cert(serviceAccount),
});
export const firestore = getFirestore(app);

View File

@ -1,6 +1,6 @@
import { Handler } from '@netlify/functions';
import { firestore } from '../../../lib/firebase';
import { fetchActorInformation } from '../../../lib/activitypub/utils/fetchActorInformation';
import { fetchActorInformation } from '../../../lib/activitypub/utils/fetchActorInformation.ts';
const handler: Handler = async (event, context) => {
const [, , username] = event.path.split('/'); // /users/:username/followers