File tree Expand file tree Collapse file tree 5 files changed +6
-4
lines changed
src/main/kotlin/io/appwrite Expand file tree Collapse file tree 5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -617,7 +617,7 @@ class Client @JvmOverloads constructor(
617617 val warnings = response.headers[" x-appwrite-warning" ]
618618 if (warnings != null ) {
619619 warnings.split(" ;" ).forEach { warning ->
620- println (" Warning: $warning " )
620+ System .err. println (" Warning: $warning " )
621621 }
622622 }
623623
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ class Query(
4141
4242 fun orderDesc (attribute : String ) = Query (" orderDesc" , attribute).toJson()
4343
44+ fun orderRandom () = Query (" orderRandom" ).toJson()
45+
4446 fun cursorBefore (documentId : String ) = Query (" cursorBefore" , null , listOf (documentId)).toJson()
4547
4648 fun cursorAfter (documentId : String ) = Query (" cursorAfter" , null , listOf (documentId)).toJson()
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ data class Document<T>(
9999 createdAt = map[" \$ createdAt" ] as String ,
100100 updatedAt = map[" \$ updatedAt" ] as String ,
101101 permissions = map[" \$ permissions" ] as List <String >,
102- data = map.jsonCast(to = nestedType)
102+ data = map[ " data " ]?.jsonCast(to = nestedType) ? : map .jsonCast(to = nestedType)
103103 )
104104 }
105105}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ data class Preferences<T>(
2929 map : Map <String , Any >,
3030 nestedType : Class <T >
3131 ) = Preferences <T >(
32- data = map.jsonCast(to = nestedType)
32+ data = map[ " data " ]?.jsonCast(to = nestedType) ? : map .jsonCast(to = nestedType)
3333 )
3434 }
3535}
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ data class Row<T>(
9999 createdAt = map[" \$ createdAt" ] as String ,
100100 updatedAt = map[" \$ updatedAt" ] as String ,
101101 permissions = map[" \$ permissions" ] as List <String >,
102- data = map.jsonCast(to = nestedType)
102+ data = map[ " data " ]?.jsonCast(to = nestedType) ? : map .jsonCast(to = nestedType)
103103 )
104104 }
105105}
You can’t perform that action at this time.
0 commit comments