Commit ·
c7775be
1
Parent(s): 4cbf751
refactor: remove user password from findById response
Browse files
api/src/data/user-database.ts
CHANGED
|
@@ -36,7 +36,7 @@ export class UserDatabase extends BaseDatabase {
|
|
| 36 |
getUserById = async (id: string) => {
|
| 37 |
try {
|
| 38 |
await this.getConnection()
|
| 39 |
-
return await UserModel.findById(id).exec()
|
| 40 |
} catch (error) {
|
| 41 |
throw new Error(error.message)
|
| 42 |
}
|
|
|
|
| 36 |
getUserById = async (id: string) => {
|
| 37 |
try {
|
| 38 |
await this.getConnection()
|
| 39 |
+
return await UserModel.findById(id, 'name email balance').exec()
|
| 40 |
} catch (error) {
|
| 41 |
throw new Error(error.message)
|
| 42 |
}
|