@@ -9,7 +9,7 @@ import Foundation
99
1010extension WordpressSite {
1111 @available ( * , renamed: " fetchSettings(urlSession:) " )
12- public func fetchSettings( completion: @escaping ( Result < WordpressSettings , Error > ) -> Void ) {
12+ public func fetchSettings( completion: @Sendable @ escaping ( Result < WordpressSettings , Error > ) -> Void ) {
1313 Task {
1414 do {
1515 let result = try await fetchSettings ( )
@@ -21,7 +21,7 @@ extension WordpressSite {
2121 }
2222
2323 @available ( * , renamed: " fetchById(urlSession:_:id:) " )
24- public func fetchById< T: WordpressItem > ( _ type: T . Type , id: Int , completion: @escaping ( Result < T , Error > ) -> Void ) {
24+ public func fetchById< T: WordpressItem > ( _ type: T . Type , id: Int , completion: @Sendable @ escaping ( Result < T , Error > ) -> Void ) {
2525 Task {
2626 do {
2727 let result = try await fetchById ( type, id: id)
@@ -44,7 +44,7 @@ extension WordpressSite {
4444 startPage: Int = 1 ,
4545 perPage: Int ? = nil ,
4646 maxNumPages: Int ? = nil ,
47- batchCompletion: @escaping ( Result < [ T ] , Error > ) -> Void ,
47+ batchCompletion: @Sendable @ escaping ( Result < [ T ] , Error > ) -> Void ,
4848 completion: ( ( ) -> Void ) ? = nil
4949 ) {
5050 Task {
@@ -87,7 +87,7 @@ extension WordpressSite {
8787 }
8888
8989 @available ( * , renamed: " itemStream(_:) " )
90- public func fetchItems< T: WordpressItem > ( _ type: T . Type , batchCompletion: @escaping ( Result < [ T ] , Error > ) -> Void , completion: ( ( ) -> Void ) ? = nil ) {
90+ public func fetchItems< T: WordpressItem > ( _ type: T . Type , batchCompletion: @Sendable @ escaping ( Result < [ T ] , Error > ) -> Void , completion: ( ( ) -> Void ) ? = nil ) {
9191 Task {
9292 let request = WordpressRequest < T > ( )
9393 do {
@@ -103,7 +103,7 @@ extension WordpressSite {
103103 }
104104
105105 @available ( * , renamed: " fetchItems(_:) " )
106- public func fetchAllItems< T: WordpressItem > ( _ type: T . Type , completion: @escaping ( Result < [ T ] , Error > ) -> Void ) {
106+ public func fetchAllItems< T: WordpressItem > ( _ type: T . Type , completion: @Sendable @ escaping ( Result < [ T ] , Error > ) -> Void ) {
107107 Task {
108108 do {
109109 let result = try await fetch ( type)
0 commit comments