Remove some meaningless awaits

This commit is contained in:
Marshall Polaris 2022-07-12 13:38:06 -07:00
parent b066ebc896
commit 6f5a018993
2 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ export const createmarket = newEndpoint({}, async (req, auth) => {
let group = null
if (groupId) {
const groupDocRef = await firestore.collection('groups').doc(groupId)
const groupDocRef = firestore.collection('groups').doc(groupId)
const groupDoc = await groupDocRef.get()
if (!groupDoc.exists) {
throw new APIError(400, 'No group exists with the given group ID.')

View File

@ -103,8 +103,8 @@ async function handleUserUpdatedReferral(user: User, eventId: string) {
description: `Referred new user id: ${user.id} for ${REFERRAL_AMOUNT}`,
}
const txnDoc = await firestore.collection(`txns/`).doc(txn.id)
await transaction.set(txnDoc, txn)
const txnDoc = firestore.collection(`txns/`).doc(txn.id)
transaction.set(txnDoc, txn)
console.log('created referral with txn id:', txn.id)
// We're currently not subtracting M$ from the house, not sure if we want to for accounting purposes.
transaction.update(referredByUserDoc, {