Listen to and share the music in the Atmosphere. musicsky.up.railway.app/
nextjs atproto music typescript react
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: use the right method to create a record

+1 -5
+1 -5
src/app/upload/actions.ts
··· 1 1 "use server"; 2 2 3 3 import { Agent } from "@atproto/api"; 4 - import { TID } from "@atproto/common-web"; 5 4 import { getSession } from "@/lib/auth/session"; 6 5 import { redirect } from "next/navigation"; 7 6 ··· 38 37 : undefined; 39 38 40 39 // Create the track record 41 - const rkey = TID.nextStr(); 42 - 43 - await agent.com.atproto.repo.putRecord({ 40 + await agent.com.atproto.repo.createRecord({ 44 41 repo: agent.assertDid, 45 42 collection: "app.musicsky.temp.track", 46 - rkey, 47 43 record: { 48 44 $type: "app.musicsky.temp.track", 49 45 title,