Skip to content

Commit f684f74

Browse files
committed
Correct PDS routing in lexicon methods that were missed
1 parent 87df183 commit f684f74

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

Sources/ATProtoKit/APIReference/ComAtprotoAPI/ComAtprotoRepoGetRecordMethod.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ extension ATProtoKit {
3838
recordCID: String? = nil,
3939
pdsURL: String? = nil
4040
) async throws -> ComAtprotoLexicon.Repository.GetRecordOutput {
41-
let host: String
42-
if let pdsURL, !pdsURL.isEmpty {
43-
host = pdsURL
44-
} else {
45-
host = await resolvePDSHost(for: repository)
46-
}
41+
let host = try await self.atidentityResolver.resolvePDSEndpoint(from: repository)
4742

4843
guard let requestURL = URL(string: "\(host)/xrpc/com.atproto.repo.getRecord") else {
4944
throw ATRequestPrepareError.invalidRequestURL

Sources/ATProtoKit/APIReference/ComAtprotoAPI/ComAtprotoRepoListRecordsMethod.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,7 @@ extension ATProtoKit {
4141
isArrayReverse: Bool? = nil,
4242
pdsURL: String? = nil
4343
) async throws -> ComAtprotoLexicon.Repository.ListRecordsOutput {
44-
let host: String
45-
if let pdsURL, !pdsURL.isEmpty {
46-
host = pdsURL
47-
} else {
48-
host = await resolvePDSHost(for: repository)
49-
}
44+
let host = try await self.atidentityResolver.resolvePDSEndpoint(from: repository)
5045

5146
guard let requestURL = URL(string: "\(host)/xrpc/com.atproto.repo.listRecords") else {
5247
throw ATRequestPrepareError.invalidRequestURL

0 commit comments

Comments
 (0)