Skip to content

Commit

Permalink
rename proposal query variable
Browse files Browse the repository at this point in the history
  • Loading branch information
andreymikhadyuk committed Jul 26, 2023
1 parent c6c5f9e commit e26e46f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/OldCommon/store/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export async function fetchUserMemberAdmittanceProposalWithCommonId(
commonId: string,
directParent?: DirectParent | null,
) {
let proposal = firebase
let proposalQuery = firebase
.firestore()
.collection(Collection.Proposals)
.where("data.args.proposerId", "==", userId)
Expand All @@ -229,16 +229,16 @@ export async function fetchUserMemberAdmittanceProposalWithCommonId(
);

if (directParent?.circleId) {
proposal = proposal.where(
proposalQuery = proposalQuery.where(
"data.args.circleId",
"==",
directParent.circleId,
);
}

const res = await proposal.get();
const proposal = await proposalQuery.get();

return transformFirebaseDataList<Proposal>(res)[0];
return transformFirebaseDataList<Proposal>(proposal)[0];
}

export async function fetchCommonList(): Promise<Common[]> {
Expand Down

0 comments on commit e26e46f

Please sign in to comment.