diff --git a/app/src/main/java/com/android/unio/model/event/EventRepositoryFirestore.kt b/app/src/main/java/com/android/unio/model/event/EventRepositoryFirestore.kt index 291a85e86..7011fee0e 100644 --- a/app/src/main/java/com/android/unio/model/event/EventRepositoryFirestore.kt +++ b/app/src/main/java/com/android/unio/model/event/EventRepositoryFirestore.kt @@ -1,6 +1,7 @@ package com.android.unio.model.event import android.util.Log +import com.android.unio.model.firestore.FirestorePaths.EVENT_PATH import com.google.firebase.Timestamp import com.google.firebase.firestore.DocumentSnapshot import com.google.firebase.firestore.FirebaseFirestore @@ -77,16 +78,13 @@ class EventRepositoryFirestore(private val db: FirebaseFirestore) : EventReposit } } - private fun hydrate(doc: DocumentSnapshot): Event? { - - val event = doc.toObject(Event::class.java) - if (event == null) { - Log.e("EventRepositoryFirestore", "Error while converting db document to Event object") - } - return event - } - companion object { - private const val EVENT_PATH = "events" + fun hydrate(doc: DocumentSnapshot): Event? { + val event = doc.toObject(Event::class.java) + if (event == null) { + Log.e("EventRepositoryFirestore", "Error while converting db document to Event object") + } + return event + } } } diff --git a/app/src/main/java/com/android/unio/model/firestore/FirestorePaths.kt b/app/src/main/java/com/android/unio/model/firestore/FirestorePaths.kt index 549fae7e7..f733804fe 100644 --- a/app/src/main/java/com/android/unio/model/firestore/FirestorePaths.kt +++ b/app/src/main/java/com/android/unio/model/firestore/FirestorePaths.kt @@ -3,4 +3,5 @@ package com.android.unio.model.firestore object FirestorePaths { const val ASSOCIATION_PATH = "associations" const val USER_PATH = "users" + const val EVENT_PATH = "events" }