Add todos for sdk migration
This commit is contained in:
@@ -163,6 +163,7 @@ export async function resolveLink(
|
|||||||
const res = await agent.resolveHandle({
|
const res = await agent.resolveHandle({
|
||||||
handle: urip.host,
|
handle: urip.host,
|
||||||
})
|
})
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = res.data.did
|
urip.host = res.data.did
|
||||||
}
|
}
|
||||||
const res = await agent.getPosts({
|
const res = await agent.getPosts({
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export function makeRecordUri(
|
|||||||
rkey: string,
|
rkey: string,
|
||||||
) {
|
) {
|
||||||
const urip = new AtUri('at://placeholder.placeholder/')
|
const urip = new AtUri('at://placeholder.placeholder/')
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = didOrName
|
urip.host = didOrName
|
||||||
urip.collection = collection
|
urip.collection = collection
|
||||||
urip.rkey = rkey
|
urip.rkey = rkey
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export function usePostQuery(uri: string | undefined) {
|
|||||||
const res = await agent.resolveHandle({
|
const res = await agent.resolveHandle({
|
||||||
handle: urip.host,
|
handle: urip.host,
|
||||||
})
|
})
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = res.data.did
|
urip.host = res.data.did
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +55,7 @@ export function useGetPost() {
|
|||||||
const res = await agent.resolveHandle({
|
const res = await agent.resolveHandle({
|
||||||
handle: urip.host,
|
handle: urip.host,
|
||||||
})
|
})
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = res.data.did
|
urip.host = res.data.did
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export async function getPostgateRecord({
|
|||||||
const res = await agent.resolveHandle({
|
const res = await agent.resolveHandle({
|
||||||
handle: urip.host,
|
handle: urip.host,
|
||||||
})
|
})
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = res.data.did
|
urip.host = res.data.did
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export function useResolveUriQuery(uri: string | undefined): UriUseQueryResult {
|
|||||||
const urip = new AtUri(uri || '')
|
const urip = new AtUri(uri || '')
|
||||||
const res = useResolveDidQuery(urip.host)
|
const res = useResolveDidQuery(urip.host)
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = res.data
|
urip.host = res.data
|
||||||
return {
|
return {
|
||||||
...res,
|
...res,
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ export async function getThreadgateRecord({
|
|||||||
const res = await agent.resolveHandle({
|
const res = await agent.resolveHandle({
|
||||||
handle: urip.host,
|
handle: urip.host,
|
||||||
})
|
})
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = res.data.did
|
urip.host = res.data.did
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ export function useUnstablePostSource(key: string) {
|
|||||||
*/
|
*/
|
||||||
export function buildPostSourceKey(key: string, handle: string) {
|
export function buildPostSourceKey(key: string, handle: string) {
|
||||||
const urip = new AtUri(key)
|
const urip = new AtUri(key)
|
||||||
|
// @ts-expect-error TODO new-sdk-migration
|
||||||
urip.host = handle
|
urip.host = handle
|
||||||
return urip.toString()
|
return urip.toString()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user