grain.social is a photo sharing platform built on atproto.

fix: update createFollow function to remove followerDid parameter

Changed files
+2 -4
src
api
lib
+2 -2
src/api/mod.ts
··· 313 313 "/xrpc/social.grain.graph.createFollow", 314 314 ["POST"], 315 315 async (req, _params, ctx) => { 316 - const { did } = ctx.requireAuth(); 316 + ctx.requireAuth(); 317 317 const { subject } = await parseCreateFollowInputs(req); 318 318 if (!subject) { 319 319 throw new XRPCError("InvalidRequest", "Missing subject input"); 320 320 } 321 321 try { 322 - const followUri = await createFollow(did, subject, ctx); 322 + const followUri = await createFollow(subject, ctx); 323 323 return ctx.json({ followUri } satisfies CreateFollowOutputSchema); 324 324 } catch (error) { 325 325 console.error("Error creating follow:", error);
-2
src/lib/graph.ts
··· 124 124 } 125 125 126 126 export async function createFollow( 127 - followerDid: string, 128 127 followeeDid: string, 129 128 ctx: BffContext, 130 129 ): Promise<string> { 131 130 const followUri = await ctx.createRecord<GrainFollow>( 132 131 "social.grain.graph.follow", 133 132 { 134 - did: followerDid, 135 133 subject: followeeDid, 136 134 createdAt: new Date().toISOString(), 137 135 },