Skip to content

Commit

Permalink
refactor(firebase): Refactor access in addTrials
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-bermonti committed May 10, 2024
1 parent cb2e485 commit 32178bb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/databases/firebase_db/firebase_db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ class FirebaseDB implements DB {
/// named `trials`.
@override
Future<void> addTrials({required List<Trial> trials}) async {
final CollectionReference trialsRef = db.collection(
'cognitive_measures/$taskName/participants/$participantID/sessions/$sessionID/trials');
final CollectionReference trialsRef = db
.collection('cognitive_measures')
.doc(taskName)
.collection('participants')
.doc(participantID)
.collection('sessions')
.doc(sessionID)
.collection('trials');

final WriteBatch batch = db.batch();

Expand Down

0 comments on commit 32178bb

Please sign in to comment.