api update
This commit is contained in:
1 parent
502a314c68
commit
99b412ea8d
19 files changed
+684
No files matched your search
@@ -0,0 +1,18 @@
|
||||
const { collection } = require('../db')
|
||||
// import { collection } from '../core/db'
|
||||
|
||||
export async function getCollective(query = {}) {
|
||||
return await collection('collective')
|
||||
.find(query)
|
||||
.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a person by it's id
|
||||
*
|
||||
* @param id
|
||||
* @returns {Promise|*}
|
||||
*/
|
||||
export async function getPerson(id) {
|
||||
return await collection('collective').findOne({ id: id });
|
||||
}
|
||||
Reference in new issue
Block a user