File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1- import { getFirestore } from " firebase-admin/firestore" ;
2- import CongregationRequest from " ../classes/CongregationRequest.js" ;
1+ import { getFirestore } from ' firebase-admin/firestore' ;
2+ import CongregationRequest from ' ../classes/CongregationRequest.js' ;
33
44const db = getFirestore ( ) ;
55
66export const dbFetchRequestsCongregation = async ( ) => {
7- const congRef = db . collection ( " congregation_request" ) ;
7+ const congRef = db . collection ( ' congregation_request' ) ;
88 const snapshot = await congRef . get ( ) ;
99
1010 const items = [ ] ;
@@ -17,8 +17,8 @@ export const dbFetchRequestsCongregation = async () => {
1717
1818 let finalResult = [ ] ;
1919 for ( let i = 0 ; i < items . length ; i ++ ) {
20- const RequestClass = new CongregationRequest ( items [ i ] ) ;
21- const request = await RequestClass . loadDetails ( ) ;
20+ const request = new CongregationRequest ( items [ i ] ) ;
21+ await request . loadDetails ( ) ;
2222 finalResult . push ( request ) ;
2323 }
2424
Original file line number Diff line number Diff line change 1- import { getFirestore } from " firebase-admin/firestore" ;
2- import { Congregation } from " ../classes/Congregation.js" ;
1+ import { getFirestore } from ' firebase-admin/firestore' ;
2+ import { Congregation } from ' ../classes/Congregation.js' ;
33
44const db = getFirestore ( ) ; //get default database
55
66export const dbFetchCongregations = async ( ) => {
7- const congRef = db . collection ( " congregations" ) ;
7+ const congRef = db . collection ( ' congregations' ) ;
88 const snapshot = await congRef . get ( ) ;
99
1010 const items = [ ] ;
@@ -16,8 +16,8 @@ export const dbFetchCongregations = async () => {
1616 const finalResult = [ ] ;
1717
1818 for ( let i = 0 ; i < items . length ; i ++ ) {
19- const CongClass = new Congregation ( items [ i ] ) ;
20- const cong = await CongClass . loadDetails ( ) ;
19+ const cong = new Congregation ( items [ i ] ) ;
20+ await cong . loadDetails ( ) ;
2121 finalResult . push ( cong ) ;
2222 }
2323
You can’t perform that action at this time.
0 commit comments