Skip to content

Commit

Permalink
refactor : sendData 매개 변수 이름 수정
Browse files Browse the repository at this point in the history
* userInfo: HashMap<String, Any?> -> data: HashMap<String, Any?>로 변경
* sendData가 여러 컬렉션을 통용하는 함수임에 따라 '전송 데이터'라는 의미의 매개 변수 사용
  • Loading branch information
jordan-comlinee committed Dec 15, 2024
1 parent 3ea44f4 commit 3f623f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/com/dna/beyoureyes/model/FirebaseHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class FirebaseHelper {
private val firestore: FirebaseFirestore = FirebaseFirestore.getInstance()

// 데이터를 Firestore에 추가
fun sendData(userInfo: HashMap<String, Any?>, collectionName: String) {
fun sendData(data: HashMap<String, Any?>, collectionName: String) {
firestore.collection(collectionName)
.add(userInfo)
.add(data)
.addOnSuccessListener { documentReference ->
Log.d("INFO", "SUCCESS added with ID: ${documentReference.id}")
}
Expand Down Expand Up @@ -82,7 +82,6 @@ class FirebaseHelper {
} catch (exception : Exception) {
Log.d("RECEIVE_USER_DATA", "Error getting documents: wrong image path", exception)
}

}

}
Expand Down

0 comments on commit 3f623f2

Please sign in to comment.