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

View File

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