fix: no : in class names
This commit is contained in:
@@ -34,7 +34,7 @@ export const getAuthor = async (did: string): Promise<Author | null> => {
|
||||
}
|
||||
|
||||
try {
|
||||
const { data: author, error } = await microcosmSlingshot(
|
||||
const { data: author } = await microcosmSlingshot(
|
||||
"/xrpc/blue.microcosm.identity.resolveMiniDoc",
|
||||
{ query: { identifier: did } },
|
||||
)
|
||||
|
||||
@@ -1,21 +1,5 @@
|
||||
import { getAuthor } from "@/modules/atproto/getAuthor"
|
||||
|
||||
const endpointCache = new Map<string, string>()
|
||||
|
||||
const getEndpoint = async (did: string) => {
|
||||
if (endpointCache.has(did)) {
|
||||
return endpointCache.get(did)
|
||||
}
|
||||
const response = await fetch(`https://plc.directory/${did}`)
|
||||
const {
|
||||
service: [{ serviceEndpoint }],
|
||||
} = await response.json()
|
||||
|
||||
endpointCache.set(did, serviceEndpoint)
|
||||
|
||||
return serviceEndpoint as string
|
||||
}
|
||||
|
||||
export const getUrl = async ({ did, rkey }: { did: string; rkey: string }) => {
|
||||
const author = await getAuthor(did)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user