Skip to content

Commit c4f8a81

Browse files
committedJan 22, 2025·
codeRabbitAi Changes
1 parent e18f262 commit c4f8a81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎data/src/main/java/com/canopas/yourspace/data/service/user/ApiUserService.kt

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class ApiUserService @Inject constructor(
4848
userRef.document(userId).collection(Config.FIRESTORE_COLLECTION_USER_SESSIONS)
4949

5050
suspend fun getUser(userId: String): ApiUser? {
51+
if (userId.isBlank()) {
52+
Timber.w("Attempted to get user with blank ID")
53+
return null
54+
}
55+
5156
return try {
5257
val user = userRef.document(userId).get().await()
5358
.toObject(ApiUser::class.java)

0 commit comments

Comments
 (0)
Please sign in to comment.