Skip to content

Commit

Permalink
feat: add firebase api
Browse files Browse the repository at this point in the history
  • Loading branch information
KTRNJack committed Mar 28, 2023
1 parent 8bae94a commit f61f0c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/firestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,12 @@ async function updateNewsletter(newsletterID, newsletter) {
return getNewsletter(newsletterID)
}

async function addPromotionEmails(email) {
const promotionEmail = Object.assign({ email, from: 'life-etiquette-park' })
let ref = bunkoFS.collection('promotion-emails').doc()
await ref.set(promotionEmail)
}

export const bunko = {
countDocs,
getDocs,
Expand Down Expand Up @@ -1050,7 +1056,8 @@ export const bunko = {
getNewsletters,
getNewsletter,
addNewsletter,
updateNewsletter
updateNewsletter,
addPromotionEmails
}

async function getAncms() {
Expand Down

0 comments on commit f61f0c7

Please sign in to comment.