Skip to content

Commit

Permalink
[feature] add missing fields on get borrower (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Pedro da Silva authored Aug 1, 2023
1 parent 3c93584 commit 91f15a8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/core/src/services/microcredit/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,20 @@ export default class MicroCreditList {
*/
public getBorrower = async (query: { address: string; include: string[] }) => {
const { address, include } = query;
const year = new Date().getUTCFullYear();
const user = await models.appUser.findOne({
attributes: ['id', 'address', 'firstName', 'lastName', 'avatarMediaPath'],
attributes: [
'id',
'address',
'firstName',
'lastName',
'avatarMediaPath',
'country',
'gender',
'email',
'phone',
[literal(`${year}-year`), 'age']
],
where: {
address
}
Expand Down

0 comments on commit 91f15a8

Please sign in to comment.