Remove some meaningless awaits
This commit is contained in:
parent
b066ebc896
commit
6f5a018993
|
@ -120,7 +120,7 @@ export const createmarket = newEndpoint({}, async (req, auth) => {
|
||||||
|
|
||||||
let group = null
|
let group = null
|
||||||
if (groupId) {
|
if (groupId) {
|
||||||
const groupDocRef = await firestore.collection('groups').doc(groupId)
|
const groupDocRef = firestore.collection('groups').doc(groupId)
|
||||||
const groupDoc = await groupDocRef.get()
|
const groupDoc = await groupDocRef.get()
|
||||||
if (!groupDoc.exists) {
|
if (!groupDoc.exists) {
|
||||||
throw new APIError(400, 'No group exists with the given group ID.')
|
throw new APIError(400, 'No group exists with the given group ID.')
|
||||||
|
|
|
@ -103,8 +103,8 @@ async function handleUserUpdatedReferral(user: User, eventId: string) {
|
||||||
description: `Referred new user id: ${user.id} for ${REFERRAL_AMOUNT}`,
|
description: `Referred new user id: ${user.id} for ${REFERRAL_AMOUNT}`,
|
||||||
}
|
}
|
||||||
|
|
||||||
const txnDoc = await firestore.collection(`txns/`).doc(txn.id)
|
const txnDoc = firestore.collection(`txns/`).doc(txn.id)
|
||||||
await transaction.set(txnDoc, txn)
|
transaction.set(txnDoc, txn)
|
||||||
console.log('created referral with txn id:', txn.id)
|
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.
|
// We're currently not subtracting M$ from the house, not sure if we want to for accounting purposes.
|
||||||
transaction.update(referredByUserDoc, {
|
transaction.update(referredByUserDoc, {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user