This commit is contained in:
2025-08-01 20:36:35 +09:00
parent 5aeeba106a
commit 85494944ad
2 changed files with 0 additions and 18 deletions

View File

@@ -21,21 +21,14 @@ export default function AtUriViewer({ uri, onAtUriClick }) {
setError(null)
try {
console.log('Loading AT URI:', uri)
const atUri = parseAtUri(uri)
if (!atUri) {
throw new Error('Invalid AT URI')
}
console.log('Parsed AT URI:', {
hostname: atUri.hostname,
collection: atUri.collection,
rkey: atUri.rkey
})
const result = await getRecord(atUri.hostname, atUri.collection, atUri.rkey)
console.log('getRecord result:', result)
if (!result.success) {
throw new Error(result.error)
@@ -43,7 +36,6 @@ export default function AtUriViewer({ uri, onAtUriClick }) {
setRecord(result.data)
} catch (err) {
console.error('AtUriViewer error:', err)
setError(err.message)
} finally {
setLoading(false)

View File

@@ -39,7 +39,6 @@ export const resolveIdentity = async (identifier) => {
did = response.data.did
resolved = true
} catch (error) {
console.log('Failed to resolve from syu.is:', error)
}
if (!resolved) {
@@ -64,7 +63,6 @@ export const resolveIdentity = async (identifier) => {
didDoc = await plcResponse.json()
}
} catch (error) {
console.log('Failed to resolve from plc.syu.is:', error)
}
// If plc.syu.is fails, try plc.directory
@@ -75,7 +73,6 @@ export const resolveIdentity = async (identifier) => {
didDoc = await plcResponse.json()
}
} catch (error) {
console.log('Failed to resolve from plc.directory:', error)
}
}
@@ -114,17 +111,13 @@ export const resolveIdentity = async (identifier) => {
// Get record from AT Protocol
export const getRecord = async (did, collection, rkey) => {
try {
console.log('getRecord called with:', { did, collection, rkey })
const identityResult = await resolveIdentity(did)
console.log('resolveIdentity result:', identityResult)
if (!identityResult.success) {
return { success: false, error: identityResult.error }
}
const pdsUrl = identityResult.pdsUrl
console.log('Using PDS URL:', pdsUrl)
const client = createAtpClient(pdsUrl)
@@ -134,15 +127,12 @@ export const getRecord = async (did, collection, rkey) => {
rkey
})
console.log('getRecord response:', response)
return {
success: true,
data: response.data,
pdsUrl
}
} catch (error) {
console.error('getRecord error:', error)
return {
success: false,
error: error.message