Skip to content

Commit

Permalink
feat update merge fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sansan88 committed Sep 10, 2023
1 parent b232824 commit 214797b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/services/firebase.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,31 @@ export class FirebaseService {
approveUserClubRequest(clubId: string, userId: string): Promise<any> {
return setDoc(doc(this.firestore, `/club/${clubId}/requests/${userId}`), {
approve: true,
},{
merge: true
});
}
approveUserTeamRequest(teamId: string, userId: string): Promise<any> {
return setDoc(doc(this.firestore, `teams/${teamId}/requests/${userId}` ), {
approve: true,
},{
merge: true
});
}

async deleteUserClubRequest(clubId: string, userId: string) {
return setDoc(doc(this.firestore, `club/${clubId}/requests/${userId}` ), {
approve: false,
},{
merge: true
});
}

async deleteUserTeamRequest(teamId: string, userId: string) {
return setDoc(doc(this.firestore, `teams/${teamId}/requests/${userId}` ), {
approve: false,
},{
merge: true
});
}

Expand Down

0 comments on commit 214797b

Please sign in to comment.