Skip to content

Commit

Permalink
codeRabbitAi Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneh-s committed Jan 22, 2025
1 parent e18f262 commit c4f8a81
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class ApiUserService @Inject constructor(
userRef.document(userId).collection(Config.FIRESTORE_COLLECTION_USER_SESSIONS)

suspend fun getUser(userId: String): ApiUser? {
if (userId.isBlank()) {
Timber.w("Attempted to get user with blank ID")
return null
}

return try {
val user = userRef.document(userId).get().await()
.toObject(ApiUser::class.java)
Expand Down

0 comments on commit c4f8a81

Please sign in to comment.