tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
remove loggs
awarm.space
6 months ago
783ea2a6
cb6bcdcb
-2
1 changed file
expand all
collapse all
unified
split
app
api
atproto_images
route.ts
-2
app/api/atproto_images/route.ts
···
8
8
did: url.searchParams.get("did") ?? "",
9
9
cid: url.searchParams.get("cid") ?? "",
10
10
};
11
11
-
console.log(params);
12
11
if (!params.did || !params.cid)
13
12
return new NextResponse(null, { status: 404 });
14
13
15
14
let identity = await idResolver.did.resolve(params.did);
16
15
let service = identity?.service?.find((f) => f.id === "#atproto_pds");
17
17
-
console.log(identity);
18
16
if (!service) return new NextResponse(null, { status: 404 });
19
17
const response = await fetch(
20
18
`${service.serviceEndpoint}/xrpc/com.atproto.sync.getBlob?did=${params.did}&cid=${params.cid}`,