Skip to content

Commit

Permalink
Add 'addedByUID' field to matches
Browse files Browse the repository at this point in the history
  • Loading branch information
Valter Schutz committed Mar 2, 2024
1 parent 4e8b039 commit 3475f40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { useState } from 'react';
import LoggedIn from './LoggedIn';
import LoggedOut from './LoggedOut';

// TODO: when adding a match, save who added the match

const firebaseConfig = {
apiKey: "AIzaSyB0fVnzGA6ikLwft4VdHt8yrfrgqOKjI7M",
authDomain: "pingis-app.firebaseapp.com",
Expand Down
3 changes: 2 additions & 1 deletion src/Entries.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ function Entries() {
player2: doc(db, 'players', playersSnapshot.docs[player2Index].id),
player1Score: player1Score,
player2Score: player2Score,
when: serverTimestamp()
when: serverTimestamp(),
addedByUID: auth.currentUser.uid,
})
setSubmitIsLoading(false)
// Allow removing of doc for 10 seconds afterwards (if undo is enabled in settings)
Expand Down

0 comments on commit 3475f40

Please sign in to comment.