adjustments to add team role and other better stuff
This commit is contained in:
@@ -52,6 +52,15 @@ export default class TeamService implements IService {
|
||||
return teamDocRef.id;
|
||||
}
|
||||
|
||||
async updateTeam(team: Team) {
|
||||
const docRef = doc(this.db, Collections.teams, team.id);
|
||||
await setDoc(
|
||||
docRef,
|
||||
{ ...team, lastUpdatedDate: serverTimestamp() },
|
||||
{ merge: true }
|
||||
);
|
||||
}
|
||||
|
||||
async getTeam(teamId: string): Promise<Team | null> {
|
||||
const docRef = doc(this.db, Collections.teams, teamId);
|
||||
const docSnap = await getDoc(docRef);
|
||||
|
||||
Reference in New Issue
Block a user