feat: initial boilerplate
This commit is contained in:
6
api/libraries/read-store/account/methods.ts
Normal file
6
api/libraries/read-store/account/methods.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { db, takeOne } from "../database.ts";
|
||||
import { type AccountSchema, fromAccountDriver } from "./schema.ts";
|
||||
|
||||
export async function getAccountById(id: string): Promise<AccountSchema | undefined> {
|
||||
return db.collection("accounts").find({ id }).toArray().then(fromAccountDriver).then(takeOne);
|
||||
}
|
||||
Reference in New Issue
Block a user