You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
316 B
JavaScript
13 lines
316 B
JavaScript
import db from "@/firebase";
|
|
import { collection, getDocs } from "firebase/firestore";
|
|
|
|
async function getAllUsers() {
|
|
const usersCollcetion = collection(db, 'users')
|
|
const users = await getDocs(usersCollcetion)
|
|
const usersList = users.docs.map(doc => doc.data())
|
|
return usersList
|
|
}
|
|
|
|
export {
|
|
getAllUsers
|
|
} |