From d52578ff47eeaaefc738a8ddfc39f4f4b8cc2dda Mon Sep 17 00:00:00 2001 From: DareFox Date: Wed, 15 Jun 2022 19:33:25 +0300 Subject: [PATCH] UserAPI: Make eachGetOperations lambda suspendable --- src/main/kotlin/kmtt/api/user/IPublicUserAPI.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/kmtt/api/user/IPublicUserAPI.kt b/src/main/kotlin/kmtt/api/user/IPublicUserAPI.kt index c4368a86..8333910e 100644 --- a/src/main/kotlin/kmtt/api/user/IPublicUserAPI.kt +++ b/src/main/kotlin/kmtt/api/user/IPublicUserAPI.kt @@ -33,7 +33,7 @@ interface IPublicUserAPI { * * @sample sampleEachOperation */ - suspend fun getAllUserComments(userID: Long, eachGetOperation: (List) -> T): List + suspend fun getAllUserComments(userID: Long, eachGetOperation: suspend (List) -> T): List /** * Get user entries @@ -56,7 +56,7 @@ interface IPublicUserAPI { * * @sample sampleEachOperation */ - suspend fun getAllUserEntries(userID: Long, eachGetOperation: (List) -> T): List + suspend fun getAllUserEntries(userID: Long, eachGetOperation: suspend (List) -> T): List } interface IAuthUserAPI : IPublicUserAPI, Authable { @@ -107,7 +107,7 @@ interface IAuthUserAPI : IPublicUserAPI, Authable { * * @sample sampleEachOperation */ - suspend fun getAllMyComments(eachGetOperation: (List) -> T): List + suspend fun getAllMyComments(eachGetOperation: suspend (List) -> T): List /** * Get entries of the current user @@ -130,7 +130,7 @@ interface IAuthUserAPI : IPublicUserAPI, Authable { * * @sample sampleEachOperation */ - suspend fun getAllMyEntries(eachGetOperation: (List) -> T): List + suspend fun getAllMyEntries(eachGetOperation: suspend (List) -> T): List /** * Get the current user's favorites @@ -153,7 +153,7 @@ interface IAuthUserAPI : IPublicUserAPI, Authable { * * @sample sampleEachOperation */ - suspend fun getAllMyFavoriteEntries(eachGetOperation: (List) -> T): List + suspend fun getAllMyFavoriteEntries(eachGetOperation: suspend (List) -> T): List /** * Get the current user's favorite comments. @@ -176,5 +176,5 @@ interface IAuthUserAPI : IPublicUserAPI, Authable { * * @sample sampleEachOperation */ - suspend fun getAllMyFavoriteComments(eachGetOperation: (List) -> T): List + suspend fun getAllMyFavoriteComments(eachGetOperation: suspend (List) -> T): List } \ No newline at end of file