tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
292
fork
atom
a tool for shared writing and social publishing
292
fork
atom
overview
issues
27
pulls
pipelines
typre errors
cozylittle.house
3 months ago
4c040829
ebf323be
+2
-2
1 changed file
expand all
collapse all
unified
split
app
lish
[did]
[publication]
icon
route.ts
+2
-2
app/lish/[did]/[publication]/icon/route.ts
···
12
12
13
13
export async function GET(
14
14
request: NextRequest,
15
15
-
props: { params: Promise<{ did: string; publication: string }> }
15
15
+
props: { params: Promise<{ did: string; publication: string }> },
16
16
) {
17
17
console.log("are we getting here?");
18
18
const params = await props.params;
···
43
43
44
44
let identity = await idResolver.did.resolve(did);
45
45
let service = identity?.service?.find((f) => f.id === "#atproto_pds");
46
46
-
if (!service) return null;
46
46
+
if (!service) return redirect("/icon.png");
47
47
let cid = (record.icon.ref as unknown as { $link: string })["$link"];
48
48
const response = await fetch(
49
49
`${service.serviceEndpoint}/xrpc/com.atproto.sync.getBlob?did=${did}&cid=${cid}`,