mirror of
https://github.com/siv-org/siv.git
synced 2026-01-09 10:27:57 -05:00
23 lines
435 B
TypeScript
23 lines
435 B
TypeScript
import './_env'
|
|
|
|
import { firebase } from '../pages/api/_services'
|
|
|
|
const election_id = '1680323766282'
|
|
const auth = ''
|
|
|
|
;(async () => {
|
|
const vote = await firebase
|
|
.firestore()
|
|
.collection('elections')
|
|
.doc(election_id)
|
|
.collection('votes')
|
|
.where('auth', '==', auth)
|
|
.get()
|
|
|
|
console.log('Found:', vote.docs.length)
|
|
|
|
const data = { ...vote.docs[0].data(), id: vote.docs[0].id }
|
|
|
|
console.log(data)
|
|
})()
|