Skip to content

Commit

Permalink
Fix reg
Browse files Browse the repository at this point in the history
  • Loading branch information
umireon committed Mar 17, 2024
1 parent dad7f55 commit 6bca0df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script lang="ts">
import { type Auth, type User, getAuth } from 'firebase/auth'
import { DEFAULT_CONTEXT, firebaseConfig } from '../constants'
import { getFirestore, createDoc } from 'firebase/firestore'
import AppSignedIn from './AppSignedIn.svelte'
import Logout from './lib/Logout.svelte'
import { authenticateWithToken } from './service/auth'
import { getAnalytics } from 'firebase/analytics'
import { getFirestore } from 'firebase/firestore'
import { getUserData } from './service/users'
import { initializeApp } from 'firebase/app'
Expand Down
6 changes: 4 additions & 2 deletions src/service/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
collection,
doc,
onSnapshot,
updateDoc,
setDoc,
} from "firebase/firestore";

import { type User } from "firebase/auth";
Expand Down Expand Up @@ -76,5 +76,7 @@ export const setUserData = async (
user: User,
data: UserData
) => {
await updateDoc(doc(getUsersCollection(db), user.uid), data);
await setDoc(doc(getUsersCollection(db), user.uid), data, {
merge: true
});

Check warning on line 81 in src/service/users.ts

View check run for this annotation

Codecov / codecov/patch

src/service/users.ts#L79-L81

Added lines #L79 - L81 were not covered by tests
};

0 comments on commit 6bca0df

Please sign in to comment.